-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow unactivated users to query Me() graphql (#344)
- Loading branch information
Showing
8 changed files
with
37 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tavern/internal/graphql/testdata/queries/users/MeUnauthenticated.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
state: | | ||
INSERT INTO `users` (id,oauth_id,photo_url,name,session_token,is_activated,is_admin) | ||
VALUES (5,"test_oauth_id","https://photos.com","test","secretToken",false,false); | ||
INSERT INTO `users` (id,oauth_id,photo_url,name,session_token,is_activated,is_admin) | ||
VALUES (6,"test_oauth_id2","https://photos.com","admin","otherToken",true,true); | ||
query: | | ||
query UnauthenticatedMe { | ||
me { | ||
id | ||
} | ||
} | ||
expected_error: no authenticated user present in request context |
18 changes: 18 additions & 0 deletions
18
tavern/internal/graphql/testdata/queries/users/MeWithUnactivatedUser.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
state: | | ||
INSERT INTO `users` (id,oauth_id,photo_url,name,session_token,is_activated,is_admin) | ||
VALUES (5,"test_oauth_id","https://photos.com","test","secretToken",false,false); | ||
INSERT INTO `users` (id,oauth_id,photo_url,name,session_token,is_activated,is_admin) | ||
VALUES (6,"test_oauth_id2","https://photos.com","admin","otherToken",true,true); | ||
requestor: | ||
session_token: secretToken | ||
query: | | ||
query MeWithUnactivatedUser { | ||
me { | ||
id | ||
isActivated | ||
} | ||
} | ||
expected: | ||
me: | ||
id: "5" | ||
isActivated: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters