-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: adds feature deviations for URI validation
- Loading branch information
1 parent
aa0a997
commit b1fa9e1
Showing
1 changed file
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |