Skip to content

Commit

Permalink
added specification tests for header matching
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Holshausen committed Jun 10, 2015
1 parent 3677c6b commit ea4bd36
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"match": true,
"comment": "Headers match with regexp",
"expected" : {
"method": "POST",
"path": "/path",
"headers": {
"Accept": "alligators",
"Content-Type": "hippos"
},
"requestMatchingRules": {
"$.headers.Accept": {"regex": "\\w+"}
}
},
"actual": {
"method": "POST",
"path": "/path",
"headers": {
"Content-Type": "hippos",
"Accept": "crocodiles"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"match": true,
"comment": "Headers match with regex",
"expected" : {
"headers": {
"Accept": "alligators",
"Content-Type": "hippos"
},
"responseMatchingRules": {
"$.headers.Accept": {"regex": "\\w+"}
}
},
"actual": {
"headers": {
"Content-Type": "hippos",
"Accept": "godzilla"
}
}
}

0 comments on commit ea4bd36

Please sign in to comment.