@@ -10,7 +10,6 @@ import (
1010 "time"
1111
1212 "github.com/ory/fosite/internal"
13- "github.com/pkg/errors"
1413 gomock "go.uber.org/mock/gomock"
1514
1615 "github.com/stretchr/testify/require"
@@ -101,26 +100,6 @@ func TestDeviceAuth_HandleDeviceEndpointRequest(t *testing.T) {
101100 authresp : & fosite.DeviceResponse {},
102101 expectErr : fosite .ErrMisconfiguration ,
103102 },
104- {
105- description : "should fail because cannot create session" ,
106- authreq : & fosite.DeviceRequest {
107- Request : fosite.Request {
108- RequestedScope : fosite.Arguments {"openid" , "email" },
109- Client : client ,
110- Session : session ,
111- },
112- },
113- authresp : & fosite.DeviceResponse {
114- DeviceCode : "device_code" ,
115- },
116- setup : func (authreq * fosite.DeviceRequest ) {
117- store .
118- EXPECT ().
119- CreateOpenIDConnectSession (gomock .Any (), gomock .Any (), gomock .Eq (authreq .Sanitize (oidcParameters ))).
120- Return (errors .New ("" ))
121- },
122- expectErr : fosite .ErrServerError ,
123- },
124103 {
125104 description : "should pass" ,
126105 authreq : & fosite.DeviceRequest {
@@ -133,12 +112,6 @@ func TestDeviceAuth_HandleDeviceEndpointRequest(t *testing.T) {
133112 authresp : & fosite.DeviceResponse {
134113 DeviceCode : "device_code" ,
135114 },
136- setup : func (authreq * fosite.DeviceRequest ) {
137- store .
138- EXPECT ().
139- CreateOpenIDConnectSession (gomock .Any (), gomock .Any (), gomock .Eq (authreq .Sanitize (oidcParameters ))).
140- Return (nil )
141- },
142115 },
143116 }
144117
0 commit comments