mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 10:01:04 +00:00
Add test
This commit is contained in:
parent
ff3021d1f3
commit
05142f4b73
1 changed files with 9 additions and 0 deletions
|
@ -186,3 +186,12 @@ class UserViews(TestCase):
|
|||
|
||||
self.local_user.refresh_from_db()
|
||||
self.assertFalse(self.local_user.show_suggested_users)
|
||||
|
||||
|
||||
def test_user_redirect(self):
|
||||
"""test the basic redirect"""
|
||||
request = self.factory.get("@mouse")
|
||||
request.user = self.anonymous_user
|
||||
result = views.user_redirect(request, "mouse")
|
||||
|
||||
self.assertEqual(result.status_code, 302)
|
||||
|
|
Loading…
Reference in a new issue