Skip to content

Commit

Permalink
fix(examples): update stale http API step definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte authored and Raphaël Benitte committed Jul 5, 2017
1 parent e89aac6 commit e04cb19
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions examples/features/http_api/fixtures/fixtures.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,77 +6,77 @@ Feature: Using fixtures with http API extension
Given I mock http call to forward request body for path /users/yaml
And set request json body from yaml_00
When I POST http://fake.io/users/yaml
Then I should receive a 200 HTTP status code
Then response status code should be 200
And response should match snapshot yaml_00

@yaml
Scenario: Setting form body from .yaml fixture file
Given I mock http call to forward request body for path /users/yaml
And set request form body from yaml_00
When I POST http://fake.io/users/yaml
Then I should receive a 200 HTTP status code
Then response status code should be 200
And response should match url encoded snapshot yaml_00

@yaml
Scenario: Setting json body from .yml fixture file
Given I mock http call to forward request body for path /users/yml
And set request json body from yaml_01
When I POST http://fake.io/users/yml
Then I should receive a 200 HTTP status code
Then response status code should be 200
And response should match snapshot yaml_01

@yaml
Scenario: Setting form body from .yml fixture file
Given I mock http call to forward request body for path /users/yml
And set request form body from yaml_01
When I POST http://fake.io/users/yml
Then I should receive a 200 HTTP status code
Then response status code should be 200
And response should match url encoded snapshot yaml_01

@text
Scenario: Setting json body from .txt fixture file
Given I mock http call to forward request body for path /users/txt
And set request json body from text_00
When I POST http://fake.io/users/txt
Then I should receive a 200 HTTP status code
Then response status code should be 200
And response should match snapshot text_00

@text
Scenario: Setting form body from .txt fixture file
Given I mock http call to forward request body for path /users/txt
And set request form body from text_00
When I POST http://fake.io/users/txt
Then I should receive a 200 HTTP status code
Then response status code should be 200
And response should match snapshot text_00

@js
Scenario: Setting json body from .js fixture file
Given I mock http call to forward request body for path /users/js
And set request json body from module_00
When I POST http://fake.io/users/js
Then I should receive a 200 HTTP status code
Then response status code should be 200
And response should match snapshot module_00

@js
Scenario: Setting form body from .js fixture file
Given I mock http call to forward request body for path /users/js
And set request form body from module_00
When I POST http://fake.io/users/js
Then I should receive a 200 HTTP status code
Then response status code should be 200
And response should match url encoded snapshot module_00

@json
Scenario: Setting json body from .json fixture file
Given I mock http call to forward request body for path /users/json
And set request json body from json_00
When I POST http://fake.io/users/json
Then I should receive a 200 HTTP status code
Then response status code should be 200
And response should match snapshot json_00

@json
Scenario: Setting form body from .json fixture file
Given I mock http call to forward request body for path /users/json
And set request form body from json_00
When I POST http://fake.io/users/json
Then I should receive a 200 HTTP status code
Then response status code should be 200
And response should match url encoded snapshot json_00
8 changes: 4 additions & 4 deletions examples/features/http_api/github.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ Feature: GitHub API
Scenario: Using GitHub API
Given I set User-Agent request header to veggies/1.0
When I GET https://api.github.com/
Then I should receive a 200 HTTP status code
Then response status code should be 200
When I pick response json emojis_url as emojisUrl
And I GET {{emojisUrl}}
Then I should receive a 200 HTTP status code
Then response status code should be 200

Scenario Outline: Fetching <key> API endpoint from root endpoint
Given I set User-Agent request header to veggies/1.0
When I GET https://api.github.com/
Then I should receive a 200 HTTP status code
Then response status code should be 200
When I pick response json <key> as <key>
And I GET {{<key>}}
Then I should receive a 200 HTTP status code
Then response status code should be 200

Examples:
| key |
Expand Down

0 comments on commit e04cb19

Please sign in to comment.