aboutsummaryrefslogtreecommitdiff
path: root/budget/tests
diff options
context:
space:
mode:
Diffstat (limited to 'budget/tests')
-rw-r--r--budget/tests/tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/budget/tests/tests.py b/budget/tests/tests.py
index d979a29..e18e9c3 100644
--- a/budget/tests/tests.py
+++ b/budget/tests/tests.py
@@ -331,6 +331,13 @@ class BudgetTestCase(TestCase):
self.app.get("/demo")
self.assertTrue(models.Project.query.get("demo") is not None)
+ def test_deactivated_demo(self):
+ run.app.config['ACTIVATE_DEMO_PROJECT'] = False
+
+ # test redirection to the create project form when demo is deactivated
+ resp = self.app.get("/demo")
+ self.assertIn('<a href="/create?project_id=demo">', resp.data.decode('utf-8'))
+
def test_authentication(self):
# try to authenticate without credentials should redirect
# to the authentication page