Skip to content

Commit 6de23bc

Browse files
committed
test(mon-pix): add support for identityProviderCode in session
1 parent c323189 commit 6de23bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mon-pix/tests/helpers/service-stubs.js

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export function stubSessionService(owner, sessionData = {}) {
2222
const userIdForLearnerAssociation = sessionData.userIdForLearnerAssociation;
2323
const userId = isAuthenticated ? sessionData.userId || 123 : null;
2424
const source = isAuthenticated ? sessionData.source || 'pix' : null;
25+
const identityProviderCode = sessionData.identityProviderCode;
2526

2627
class SessionStub extends Service {
2728
constructor() {
@@ -34,6 +35,10 @@ export function stubSessionService(owner, sessionData = {}) {
3435
this.data = {
3536
authenticated: { user_id: userId, source, access_token: 'access_token!' },
3637
};
38+
39+
if (identityProviderCode) {
40+
this.data.identityProviderCode = identityProviderCode;
41+
}
3742
} else {
3843
this.data = {};
3944
}

0 commit comments

Comments
 (0)