Commit e5297a8c authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added tests to check for 200 response codes for the welcome pages

parent 8546709c
......@@ -3,8 +3,11 @@ from __future__ import absolute_import, print_function
from datetime import date
# core django imports
from django.test import TestCase
from django.core.urlresolvers import reverse
# imports from your apps
from welcome.views import get_semester
from housing.test_views import RoomlistViewTest
class GetSemesterTest(TestCase):
......@@ -22,3 +25,35 @@ class GetSemesterTest(TestCase):
created = date(month=1, day=1, year=2016) # New Years Day
semester = get_semester(created)
self.assertEqual(semester, 'Spring')
class WelcomeNameTest(RoomlistViewTest):
def test_welcome_name_ok(self):
client = self.client_login()
response = client.get(reverse('welcomeName'))
self.assertEqual(response.status_code, 200)
class WelcomePrivacyTest(RoomlistViewTest):
def test_welcome_privacy_ok(self):
client = self.client_login()
response = client.get(reverse('welcomePrivacy'))
self.assertEqual(response.status_code, 200)
class WelcomeMajorTest(RoomlistViewTest):
def test_welcome_major_ok(self):
client = self.client_login()
response = client.get(reverse('welcomeMajor'))
self.assertEqual(response.status_code, 200)
class WelcomeSocialTest(RoomlistViewTest):
def test_welcome_social_ok(self):
client = self.client_login()
response = client.get(reverse('welcomeSocial'))
self.assertEqual(response.status_code, 200)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment