mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-29 01:42:37 +02:00
Add tests for #294
This commit is contained in:
parent
f2a53eb1e3
commit
9fea0ffe2c
1 changed files with 7 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue