zend-blog-3-backend

Форк
0
31 строка · 1.1 Кб
1
Feature: api
2
  Test API for ember.js application
3

4
  Scenario: tags
5
    When I logged in as admin
6
    When I am on "/api/tags"
7
    Then the response status code should be 200
8
    And the json path "[tags][0][name]" should contain "accusamus"
9

10
    When I send "POST" to "/api/tags" with data:
11
      | tag[name] | a 104 |
12
    Then the response status code should be 201
13

14
    When I am on "/api/tags"
15
    Then the json path "[tags][0][name]" should contain "a 104"
16
    And the json path "[tags][0][url]" should contain "a-104"
17

18
  Scenario: categories
19
    When I logged in as admin
20
    When I am on "/api/categories"
21
    Then the response status code should be 200
22
    And the json path "[categories][0][name]" should contain "Database"
23

24
    When I send "POST" to "/api/categories" with data:
25
      | category[name]     | SQL Server |
26
      | category[parentId] | 7          |
27
    Then the response status code should be 201
28

29
    When I am on "/api/categories"
30
    Then the json path "[categories][7][name]" should contain "SQL Server"
31
    And the json path "[categories][7][url]" should contain "sql-server"
32

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.