Skip to content

Commit

Permalink
add in tests for application
Browse files Browse the repository at this point in the history
  • Loading branch information
fredkingham committed May 2, 2017
1 parent 8fa290e commit 5ae08c0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions elcid/test/test_application.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from opal.core.test import OpalTestCase
from elcid import Application


class ApplicationTestCase(OpalTestCase):
def test_get_menu_items(self):
menu_items = Application.get_menu_items()
expected_hrefs = [menu_item["href"] for menu_item in menu_items]
self.assertIn("/pathway/#/add_patient", expected_hrefs)

def test_make_sure_we_dont_change_a_global_object(self):
# make sure we don't change the list as it appears on
# the application object
menu_items_1 = Application.get_menu_items()
menu_items_2 = Application.get_menu_items()
self.assertEqual(menu_items_1, menu_items_2)

0 comments on commit 5ae08c0

Please sign in to comment.