Skip to content

Commit

Permalink
add test to onsite
Browse files Browse the repository at this point in the history
  • Loading branch information
meanderfox committed Jul 2, 2024
1 parent f7368b8 commit 74f84ac
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion registration/tests/test_onsite.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,22 @@ def test_onsite_open(self):
self.assertEqual(response.context["event"], self.event)
self.assertIn(b"Onsite Registration", response.content)

def test_onsite_closed(self):
def test_onsite_closed_upcoming(self):
self.event.onsiteRegStart = now + one_day
self.event.save()
response = self.client.get(reverse("registration:onsite"))
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context["event"], self.event)
self.assertIn(b"not yet open", response.content)

def test_onsite_closed_ended(self):
self.event.onsiteRegEnd = now - one_day
self.event.save()
response = self.client.get(reverse("registration:onsite"))
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context["event"], self.event)
self.assertIn(b"has ended", response.content)

def test_onsite_checkout_cost(self):
options = [
{"id": self.option_conbook.id, "value": "true"},
Expand Down

0 comments on commit 74f84ac

Please sign in to comment.