Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Creating Signed Cookies in Capybara
# spec/features/profile_management_spec.rb
require 'rails_helper'
feature 'Profile Management', type: :feature do
given!(:user) { create(:user) }
scenario 'User updates profile' do
cookie = SignedCookieGenerator.new(:auth, user.id)
page.driver.browser.set_cookie(cookie.to_s)
visit '/account/profile'
expect(page).to have_text('Profile Page')
end
end
@terenceponce

This comment has been minimized.

Copy link
Owner Author

terenceponce commented Sep 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.