zend-blog-3-backend
31 строка · 1.1 Кб
1Feature: api
2Test API for ember.js application
3
4Scenario: tags
5When I logged in as admin
6When I am on "/api/tags"
7Then the response status code should be 200
8And the json path "[tags][0][name]" should contain "accusamus"
9
10When I send "POST" to "/api/tags" with data:
11| tag[name] | a 104 |
12Then the response status code should be 201
13
14When I am on "/api/tags"
15Then the json path "[tags][0][name]" should contain "a 104"
16And the json path "[tags][0][url]" should contain "a-104"
17
18Scenario: categories
19When I logged in as admin
20When I am on "/api/categories"
21Then the response status code should be 200
22And the json path "[categories][0][name]" should contain "Database"
23
24When I send "POST" to "/api/categories" with data:
25| category[name] | SQL Server |
26| category[parentId] | 7 |
27Then the response status code should be 201
28
29When I am on "/api/categories"
30Then the json path "[categories][7][name]" should contain "SQL Server"
31And the json path "[categories][7][url]" should contain "sql-server"
32