Skip to content

Commit da2d98e

Browse files
committed
fix tests
1 parent 3cbbc02 commit da2d98e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

test/getWorkspaceTeam.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('getWorkspaceTeam', function() {
1919
await Invitation.deleteMany({});
2020

2121
// Create an admin user
22-
adminUser = await User.create({ email: '[email protected]', githubUsername: 'admin' });
22+
adminUser = await User.create({ email: '[email protected]', githubUsername: 'admin', githubUserId: '0000' });
2323

2424
// Create an access token for the admin
2525
adminAccessToken = await AccessToken.create({ userId: adminUser._id });
@@ -36,6 +36,7 @@ describe('getWorkspaceTeam', function() {
3636
// Create invitations with "pending" and "declined" statuses
3737
invitation1 = await Invitation.create({
3838
workspaceId: workspace._id,
39+
githubUserId: '1234',
3940
githubUsername: 'user1',
4041
status: 'pending',
4142
invitedBy: adminUser._id,
@@ -44,6 +45,7 @@ describe('getWorkspaceTeam', function() {
4445

4546
invitation2 = await Invitation.create({
4647
workspaceId: workspace._id,
48+
githubUserId: '5678',
4749
githubUsername: 'user2',
4850
status: 'declined',
4951
invitedBy: adminUser._id,

test/inviteToWorkspace.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ describe('inviteToWorkspace', function() {
7272
const invitedUser = await User.create({
7373
name: 'Jane Smith',
7474
75-
githubUsername: 'janesmith'
75+
githubUsername: 'janesmith',
76+
githubUserId: '5678'
7677
});
7778

7879
// Add the user directly as a member of the workspace

test/verifyGithubAccessToken.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('verifyGithubAccessToken', function() {
1414
await User.deleteMany({});
1515
await AccessToken.deleteMany({});
1616

17-
user = await User.create({ email: '[email protected]', githubUsername: 'test' });
17+
user = await User.create({ email: '[email protected]', githubUsername: 'test', githubUserId: '5678' });
1818
accessToken = await AccessToken.create({ userId: user._id });
1919

2020
const task = { sideEffect: async (fn, params) => fn(params) };

0 commit comments

Comments
 (0)