Skip to content

Commit

Permalink
fix: adds feature deviations for URI validation
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-zakharchenko committed Jun 20, 2019
1 parent aa0a997 commit b1fa9e1
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions features/expectations/uri.feature
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
@stable
@javascript @stable
Feature: URI

Background:
Scenario: Matching HTTP message URI
Given you expect HTTP message URI "/animals?type=cats"

Scenario: HTTP message URI match
When real HTTP message URI is "/animals?type=cats"
Then field "uri" is valid
And Request or Response is valid

Scenario: Different HTTP message URI
Scenario: Non-matching HTTP message URI
Given you expect HTTP message URI "/animals?type=cats"
When real HTTP message URI is "/animals?type=dogs"
Then field "uri" is NOT valid
And Request or Response is NOT valid

Scenario: URI with the same parameters in different order
Given you expect HTTP message URI "/animals?type=cats&count=2"
When real HTTP message URI is "/animals?count=2&type=cats"
Then field "uri" is valid
And Request or Response is valid

Scenario Outline: URI with parameter having multiple values
Given you expect HTTP message URI "/animals?type=cats&type=dogs"
When real HTTP message URI is <real-uri>
Then field "uri" <is-uri-valid>
And Request or Response <is-message-valid>

Examples:
| real-uri | is-uri-valid | is-message-valid |
| "/animals?type=cats&type=dogs" | is valid | is valid |
| "/animals?type=dogs&type=cats" | is NOT valid | is NOT valid |

Scenario: Case-sensitive URI comparison
Given you expect HTTP message URI "/animals?type=cats"
When real HTTP message URI is "/animals?tYpe=cAtS"
Then field "uri" is NOT valid
And Request or Response is NOT valid

0 comments on commit b1fa9e1

Please sign in to comment.