Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add missing spec for stub app status code.

  • Loading branch information...
commit 1ca7799358cf9cd22c7696fff184f93740f618cf 1 parent 5148e9e
@myronmarston myronmarston authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 spec/unit/interpol/stub_app_spec.rb
View
9 spec/unit/interpol/stub_app_spec.rb
@@ -14,6 +14,7 @@ module Interpol
method: GET
definitions:
- versions: ["1.0"]
+ status_codes: ['200']
message_type: response
schema:
type: object
@@ -172,6 +173,14 @@ def parsed_body
parsed_body.should eq("message" => "Interpol stub app running.")
end
+ it 'assigns the status code based on the endpoint definition' do
+ endpoint_definition_yml.gsub!("status_codes: ['200']", "status_codes: ['214']")
+
+ header 'Response-Version', '1.0'
+ get '/users/3/projects'
+ last_response.status.should eq(214)
+ end
+
it 'can be used together with the RequestParamsParser' do
app.use Interpol::Sinatra::RequestParamsParser, &default_config
Please sign in to comment.
Something went wrong with that request. Please try again.