Answer the question
In order to leave comments, you need to log in
How to create session in rspec test?
Good afternoon, ladies and gentlemen. The question is, in one of the controller methods I receive data from the session created earlier:
def create
provider = session['devise.oauth_data']['provider']
uid = session['devise.oauth_data']['uid']
. . .
end
describe 'POST #create' do
before do
session["devise.oauth_data"] = {provider: 'twitter', uid: '123456'}
end
. . .
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question