Skip to content

Commit

Permalink
Revert "remove trust score"
Browse files Browse the repository at this point in the history
This reverts commit d4145e5.
  • Loading branch information
nickoferrall committed Aug 21, 2023
1 parent d4145e5 commit 9b92924
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions packages/server/__tests__/inviteToTeam.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,39 @@ test('Invite to team, works for ordinary email domain', async () => {
}
})
})

test('Invite to team, deny for untrusted domain', async () => {
const {userId, authToken} = await signUp()
const {email: inviteeEmail} = await signUp()

const teamId = (await getUserTeams(userId))[0].id
const inviteToTeam = await sendPublic({
query: `
mutation InviteToTeam($teamId: ID!, $invitees: [Email!]!) {
inviteToTeam(teamId: $teamId, invitees: $invitees) {
error {
title
message
}
invitees
}
}
`,
variables: {
teamId,
invitees: ['foo@qq.com', inviteeEmail]
},
authToken
})

expect(inviteToTeam).toMatchObject({
data: {
inviteToTeam: {
error: {
message: 'Cannot invite by email. Try using invite link',
title: null
}
}
}
})
})

0 comments on commit 9b92924

Please sign in to comment.