From 7af88a1b2c83bd5163bcb7c94f05cbed7f28b2a6 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sun, 19 Feb 2017 11:58:38 -0600 Subject: [PATCH] Test can signin in with build. --- bikeshop_project/registration/tests/test_views.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bikeshop_project/registration/tests/test_views.py b/bikeshop_project/registration/tests/test_views.py index be2678c..5b15d96 100644 --- a/bikeshop_project/registration/tests/test_views.py +++ b/bikeshop_project/registration/tests/test_views.py @@ -143,3 +143,14 @@ class TestMemberSignIn(TestCase): self.assertTrue(len(data), 3) self.assertTrue('banned' in data[0]['member']) self.assertTrue('suspended' in data[0]['member']) + + def test_signin_visit(self): + """ + Sign-in with 'BUILD' works. + """ + url = reverse('member_signin') + c = Client() + c.force_login(self.user) + + response = c.post(url, data={'id': self.members[0].id, 'purpose': 'BUILD'}) + self.assertEqual(response.status_code, 201)