aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ihatemoney/tests')
-rw-r--r--ihatemoney/tests/tests.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py
index 9d611d7..a7d70ce 100644
--- a/ihatemoney/tests/tests.py
+++ b/ihatemoney/tests/tests.py
@@ -632,6 +632,16 @@ class BudgetTestCase(IhatemoneyTestCase):
balance = models.Project.query.get("raclette").balance
self.assertEqual(set(balance.values()), set([6, -6]))
+ def test_trimmed_members(self):
+ self.post_project("raclette")
+
+ # Add two times the same person (with a space at the end).
+ self.client.post("/raclette/members/add", data={'name': 'alexis'})
+ self.client.post("/raclette/members/add", data={'name': 'alexis '})
+ members = models.Project.query.get("raclette").members
+
+ self.assertEqual(len(members), 1)
+
def test_weighted_members_list(self):
self.post_project("raclette")
@@ -1225,7 +1235,6 @@ class APITestCase(IhatemoneyTestCase):
self.assertEqual(False, json.loads(req.data.decode('utf-8'))["activated"])
# re-activate the user
-
req = self.client.put("/api/projects/raclette/members/1", data={
"name": "Fred",
"activated": True,