aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/tests
diff options
context:
space:
mode:
authorAlexis Métaireau <alexis@notmyidea.org>2017-12-27 16:30:56 +0100
committerAlexis Métaireau <alexis@notmyidea.org>2017-12-27 17:06:46 +0100
commit9fea0ffe2c46ff3b098a6a2dcbf7b11b90b738dc (patch)
tree517535500677552cbcde46d36f5645ad2cdd5af4 /ihatemoney/tests
parentf2a53eb1e3e9b4be1673d34069138d3da6f6caa9 (diff)
downloadihatemoney-mirror-9fea0ffe2c46ff3b098a6a2dcbf7b11b90b738dc.zip
ihatemoney-mirror-9fea0ffe2c46ff3b098a6a2dcbf7b11b90b738dc.tar.gz
ihatemoney-mirror-9fea0ffe2c46ff3b098a6a2dcbf7b11b90b738dc.tar.bz2
Add tests for #294
Diffstat (limited to 'ihatemoney/tests')
-rw-r--r--ihatemoney/tests/tests.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py
index 97e9df3..b605889 100644
--- a/ihatemoney/tests/tests.py
+++ b/ihatemoney/tests/tests.py
@@ -1153,7 +1153,13 @@ class APITestCase(IhatemoneyTestCase):
self.assertStatus(200, req)
self.assertEqual(len(json.loads(req.data.decode('utf-8'))), 1)
- # edit this member
+ # Try to add another member with the same name.
+ req = self.client.post("/api/projects/raclette/members", data={
+ "name": "Alexis"
+ }, headers=self.get_auth("raclette"))
+ self.assertStatus(400, req)
+
+ # edit the member
req = self.client.put("/api/projects/raclette/members/1", data={
"name": "Fred",
"weight": 2,