1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00

Add a test for #23

This commit is contained in:
Alexis Metaireau 2011-09-14 14:50:54 +02:00
parent b0d41291af
commit 1b8258a521

View file

@ -186,6 +186,15 @@ class BudgetTestCase(TestCase):
self.assertEqual( self.assertEqual(
len(models.Project.query.get("raclette").active_members), 2) len(models.Project.query.get("raclette").active_members), 2)
# adding an user with the same name as another user from a different
# project should not cause any troubles
self.post_project("randomid")
self.login("randomid")
self.app.post("/randomid/members/add", data={'name': 'fred' })
self.assertEqual(
len(models.Project.query.get("randomid").active_members), 1)
def test_demo(self): def test_demo(self):
# Test that it is possible to connect automatically by going onto /demo # Test that it is possible to connect automatically by going onto /demo
with run.app.test_client() as c: with run.app.test_client() as c: