Skip to content

Commit

Permalink
fix admin tests (#55)
Browse files Browse the repository at this point in the history
* redirect to home page with error message if state is invalid

* ui updates

* fix admin tests
  • Loading branch information
amalshaji committed Apr 30, 2024
1 parent 94011c2 commit 1b5fe21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/src/portr_admin/tests/api_tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def test_github_callback_invalid_state(self):
"/api/v1/auth/github/callback?code=test_code&state=invalid_state",
follow_redirects=False,
)
assert resp.status_code == 400
assert resp.text == "Invalid state"
assert resp.status_code == 307
assert resp.headers["location"] == "/?code=invalid-state"

@patch("portr_admin.services.user.get_or_create_user_from_github")
async def test_github_callback_user_not_found(
Expand Down

0 comments on commit 1b5fe21

Please sign in to comment.