|
|
@ -5,7 +5,6 @@ const { data } = require("./utilities/mock-data") |
|
|
const TENANT_ID = "default" |
|
|
const TENANT_ID = "default" |
|
|
|
|
|
|
|
|
const googleConfig = { |
|
|
const googleConfig = { |
|
|
callbackURL: "http://somecallbackurl", |
|
|
|
|
|
clientID: data.clientID, |
|
|
clientID: data.clientID, |
|
|
clientSecret: data.clientSecret, |
|
|
clientSecret: data.clientSecret, |
|
|
} |
|
|
} |
|
|
@ -28,13 +27,14 @@ describe("google", () => { |
|
|
|
|
|
|
|
|
it("should create successfully create a google strategy", async () => { |
|
|
it("should create successfully create a google strategy", async () => { |
|
|
const google = require("../google") |
|
|
const google = require("../google") |
|
|
|
|
|
|
|
|
await google.strategyFactory(googleConfig, `/api/global/auth/${TENANT_ID}/google/callback`) |
|
|
const callbackUrl = `/api/global/auth/${TENANT_ID}/google/callback` |
|
|
|
|
|
await google.strategyFactory(googleConfig, callbackUrl) |
|
|
|
|
|
|
|
|
const expectedOptions = { |
|
|
const expectedOptions = { |
|
|
clientID: googleConfig.clientID, |
|
|
clientID: googleConfig.clientID, |
|
|
clientSecret: googleConfig.clientSecret, |
|
|
clientSecret: googleConfig.clientSecret, |
|
|
callbackURL: googleConfig.callbackURL, |
|
|
callbackURL: callbackUrl, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
expect(mockStrategy).toHaveBeenCalledWith( |
|
|
expect(mockStrategy).toHaveBeenCalledWith( |
|
|
|