-
Notifications
You must be signed in to change notification settings - Fork 1
/
httpie_test_commands.txt
26 lines (21 loc) · 1.48 KB
/
httpie_test_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
http POST localhost:3000/api/boards <<< '{"board": {"title": "hello world"}}'
http POST localhost:3000/api/lists <<< '{"board_id": 1, "list": {"title": "my list"}}'
http PUT localhost:3000/api/lists/4 <<< '{"title": "updated title"}'
http PATCH localhost:3000/api/lists/4 <<< '{"title": "another updated title"}'
http POST localhost:3000/api/cards <<< '{"list_id": 113, "card": {"title": "my card"}}'
http GET localhost:3000/api/cards/8
http GET localhost:3000/api/boards/2
// create a card
http POST localhost:3000/api/cards <<< '{"list_id": 133, "card": {"title": "testing multiple attributes", "labels":["red", "blue"]}}'
// should return 200 with the updated card in json format
http PUT localhost:3000/api/cards/117 <<< '{"card": {"title": "my updated card"}}'
http PUT localhost:3000/api/cards/125 <<< '{"card": {"labels":["red"]}}'
http PUT localhost:3000/api/cards/125 <<< '{"card": {"list_id": 133}}'
http PUT localhost:3000/api/cards/125 <<< '{"card": {"archived": true}}'
http PUT localhost:3000/api/cards/125 <<< '{"card": {"due_date": "2020-03-05T17:54:55.285Z"}}'
http PUT localhost:3000/api/cards/125 <<< '{"card": {"completed": true}}'
http PUT localhost:3000/api/cards/125 <<< '{"card": {"title": "this new task", "completed": false}}'
// should return 404 with an error if card with this id does not exist
http PUT localhost:3000/api/cards/1 <<< '{"card": {"title": "hello world"}}'
// should return 422 unprocessable entity with an error
http PUT localhost:3000/api/cards/117 <<< '{"card": {}}'