Skip to content

Commit

Permalink
Added unit test for default_headers DSL method
Browse files Browse the repository at this point in the history
  • Loading branch information
nagius committed Feb 22, 2016
1 parent 8a8be91 commit de02c99
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/angelo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,20 @@ class MyWebApp < Angelo::Base

end

describe 'default_headers' do

define_app do
default_headers "Access-Control-Allow-Origin" => "*"
get('/'){ 'hi' }
end

it 'adds a default headers' do
get '/'
last_response.headers['Access-Control-Allow-Origin'].must_equal "*"
end

end

end

end

0 comments on commit de02c99

Please sign in to comment.