KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
When I login to my app the server sends me back cookies(credentials and some app's cookie): Response sent 170 bytes of Cookie data: Set-Cookie: user_credentials=val; path=/; HttpOnly; Secure Response sent 554 bytes of Cookie data: Set-Cookie: _app_session=otherVal; path=/; HttpOnly; Secure ...and then redirects to the home page; Cookies include some flags: e.g. httpOnly , Secure , etc. How can I test whether cookies do include those flags with Rspec? At least where can I find those cookies? it "should generate cookies with proper flags" do params = Factory.attributes_for(:user, :username => "uname", :password => "upass" ) # login post 'create', params response.should redirect_to home_url # => pass puts "response cookie = #{response.cookies.inspect}" # => {} // no cookies in response, why? end
Tags (comma-separated)
Save Edits
Cancel