Skip to content

Commit adaeef1

Browse files
committed
refactor(tests): check for 404 after deletion
1 parent f50c4bf commit adaeef1

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

tests/crud.robot

+4-8
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,15 @@ GET should return a value
2323
Status Should Be 200 ${response}
2424
Dictionary Should Contain Item ${response.json()} counter 1
2525

26-
GET should return not found
27-
${response}= Get Request api /v1/categories/100
28-
Status Should Be 404 ${response}
2926

3027
PUT should update an object
3128
&{payload}= Create Dictionary name=Fauna nameRu=Фауна slug=fauna userId=1
3229
${response}= Put Request api /v1/categories/1 json=${payload}
3330
Status Should Be 204 ${response}
3431

3532
DELETE should remove an object
36-
${response}= Delete Request api /v1/categories/1
37-
Status Should Be 204 ${response}
33+
${response}= Delete Request api /v1/categories/1
34+
Status Should Be 204 ${response}
3835
# checks that it was removed
39-
${response}= Get Request api /v1/categories/count
40-
Status Should Be 200 ${response}
41-
Dictionary Should Contain Item ${response.json()} counter 0
36+
${response}= Get Request api /v1/categories/1
37+
Status Should Be 404 ${response}

0 commit comments

Comments
 (0)