Skip to content

Commit 4baf098

Browse files
committed
test: check that GET /v1/categories return a list of values
1 parent bfde15b commit 4baf098

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/crud.robot

+8
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ GET should return a value
2626
&{expected}= Create Dictionary id=${1} name=Sport name_ru=${null} slug=sport
2727
Dictionaries Should Be Equal ${body} ${expected}
2828

29+
GET should return a list of values
30+
${response}= Get Request api /v1/categories
31+
${body}= Set Variable ${response.json()}
32+
Status Should Be 200 ${response}
33+
Should Be Equal ${response.headers['Content-Type']} application/json; charset=utf-8
34+
&{expected}= Create Dictionary id=${1} name=Sport name_ru=${null} slug=sport
35+
Length Should Be ${body} 1
36+
Dictionaries Should Be Equal ${body[0]} ${expected}
2937

3038
PUT should update an object
3139
&{payload}= Create Dictionary name=Fauna nameRu=Фауна slug=fauna userId=1

0 commit comments

Comments
 (0)