Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add simple access test case for email logs

Roland Geider53b7811f9496
diff --git a/wger/email/tests/__init__.py b/wger/email/tests/__init__.py
new file mode 100644
index 000000000..6682a6736
--- /dev/null
+++ b/wger/email/tests/__init__.py
@@ -0,0 +1 @@
+__author__ = 'ogre'
diff --git a/wger/email/tests/test_gym_emails.py b/wger/email/tests/test_gym_emails.py
new file mode 100644
index 000000000..dbf968109
--- /dev/null
+++ b/wger/email/tests/test_gym_emails.py
@@ -0,0 +1,41 @@
+# This file is part of wger Workout Manager.
+#
+# wger Workout Manager is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# wger Workout Manager is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+
+from django.core.urlresolvers import reverse
+
+from wger.email.models import Log
+from wger.manager.tests.testcase import (
+ WorkoutManagerAccessTestCase,
+ WorkoutManagerEditTestCase,
+ WorkoutManagerAddTestCase,
+)
+
+
+class AccessContractTestCase(WorkoutManagerAccessTestCase):
+ '''
+ Test accessing the detail page of a contract
+ '''
+ url = reverse('email:email:overview', kwargs={'gym_pk': 1})
+ user_success = ('manager1',
+ 'manager2')
+ user_fail = ('admin',
+ 'general_manager1',
+ 'manager3',
+ 'manager4',
+ 'test',
+ 'member1',
+ 'member2',
+ 'member3',
+ 'member4',
+ 'member5')