Skip to content

Commit

Permalink
Fix failing live tests pipeline (#21404)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximrytych-ms authored Apr 19, 2022
1 parent 7997f01 commit edb1569
Showing 1 changed file with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
createHttpHeaders,
} from "@azure/core-rest-pipeline";
import { CommunicationAccessToken } from "../../../src";
import { CommunicationIdentityAccessTokenResult } from "../../../src/generated/src/models";

export const createMockHttpClient = <T = Record<string, unknown>>(
status: number = 200,
Expand Down Expand Up @@ -42,19 +41,17 @@ export const getTokenHttpClient: HttpClient = createMockHttpClient<Communication
);
export const revokeTokensHttpClient: HttpClient = createMockHttpClient(204);

export const createUserHttpClient: HttpClient =
createMockHttpClient<CommunicationIdentityAccessTokenResult>(201, {
identity: { id: "identity" },
});

export const createUserAndTokenHttpClient: HttpClient =
createMockHttpClient<CommunicationIdentityAccessTokenResult>(201, {
identity: { id: "identity" },
accessToken: {
token: "token",
expiresOn: new Date("2011/11/30"),
},
});
export const createUserHttpClient: HttpClient = createMockHttpClient(201, {
identity: { id: "identity" },
});

export const createUserAndTokenHttpClient: HttpClient = createMockHttpClient(201, {
identity: { id: "identity" },
accessToken: {
token: "token",
expiresOn: new Date("2011/11/30"),
},
});

export const getTokenForTeamsUserHttpClient: HttpClient =
createMockHttpClient<CommunicationAccessToken>(200, tokenResponse);

0 comments on commit edb1569

Please sign in to comment.