Skip to content

Commit

Permalink
feat: adds "uri" validation feature
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-zakharchenko committed Jun 6, 2019
1 parent a2f8357 commit cf50d5e
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions features/expectations/uri.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
Feature: URI

Background:
Given you expect HTTP message URI "http://apiary.io/path"

Scenario: Different HTTP message URI
When real HTTP message URI is "http://foo.bar"
Then Gavel will set some errors for "uri"
And Gavel will set "isValid" to "false" for "uri"
And Request or Response is NOT valid
Given you expect HTTP message URI "https://domain.com/path"

Scenario: HTTP message URI match
When real HTTP message URI is "http://apiary.io/path"
Then Gavel will NOT set any errors for "uri"
And Gavel will set "isValid" to "true" for "uri"
When real HTTP message URI is "http://foo.bar"
Then field "uri" is valid
And Request or Response is valid

Scenario: Different HTTP message URI
When real HTTP message URI is "https://domain.com/path"
Then field "uri" is NOT valid
And Request or Response is NOT valid

0 comments on commit cf50d5e

Please sign in to comment.