Skip to content

Commit

Permalink
Update specs with secure cookie flag
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiassiegel committed Apr 21, 2014
1 parent ded89d5 commit 113cb93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/app/set_cookie.rb
Expand Up @@ -5,7 +5,7 @@
end

get '/set/:key/:value' do
response.set_cookie params[:key], {:value => params[:value], :path => '/'}
response.set_cookie params[:key], {:value => params[:value], :path => '/', :secure => false}
"Setting #{params[:key]}=#{params[:value]}"
end

Expand Down
4 changes: 2 additions & 2 deletions spec/shared_examples_for_api.rb
Expand Up @@ -18,7 +18,7 @@ def cookies_should_not_contain(key, value)
describe "get_me_the_cookie" do
it "returns the cookie hash" do
visit '/set/foo/bar'
get_me_the_cookie('foo').should include(:name => "foo", :value => "bar", :expires => nil)
get_me_the_cookie('foo').should include(:name => "foo", :value => "bar", :expires => nil, :secure => false)
end
end

Expand All @@ -30,7 +30,7 @@ def cookies_should_not_contain(key, value)
it "returns an array of standardised cookie hashes" do
visit '/set/foo/bar'
page.should have_content("Setting foo=bar")
get_me_the_cookies.first.should include(:name => "foo", :value => "bar", :expires => nil)
get_me_the_cookies.first.should include(:name => "foo", :value => "bar", :expires => nil, :secure => false)
visit '/set/myopic/mice'
get_me_the_cookies.length.should be(2)
end
Expand Down

0 comments on commit 113cb93

Please sign in to comment.