Skip to content

Commit fc56b03

Browse files
authored
Update public_test.go (#560)
1 parent 3e85bc9 commit fc56b03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/public/public_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func TestAcquireTokenByDeviceCode(t *testing.T) {
209209
UserCode: "user-code",
210210
VerificationURL: "https://device.code.local",
211211
}
212-
mockClient := mock.Client{}
212+
mockClient := mock.NewClient()
213213
mockClient.AppendResponse(mock.WithBody(mock.GetTenantDiscoveryBody("http://localhost", "tenant")))
214214
mockClient.AppendResponse(mock.WithBody([]byte(
215215
fmt.Sprintf(
@@ -222,7 +222,7 @@ func TestAcquireTokenByDeviceCode(t *testing.T) {
222222
),
223223
)))
224224
mockClient.AppendResponse(
225-
mock.WithBody(mock.GetAccessTokenBody(accessToken, "", "rt", "", 3600)),
225+
mock.WithBody(mock.GetAccessTokenBody(accessToken, "", "rt", "", 3600, 3600)),
226226
mock.WithCallback(func(r *http.Request) {
227227
if r.Method != http.MethodPost {
228228
t.Fatalf("unexpected method %q", r.Method)
@@ -238,7 +238,7 @@ func TestAcquireTokenByDeviceCode(t *testing.T) {
238238
}
239239
}),
240240
)
241-
client, err := New(expected.ClientID, WithHTTPClient(&mockClient))
241+
client, err := New(expected.ClientID, WithHTTPClient(mockClient))
242242
if err != nil {
243243
t.Fatal(err)
244244
}

0 commit comments

Comments
 (0)