Story Runner with session problems

K

Karni Karni

Hi Friends,

I'm having the session handling issue in story runner.

Small description about my applications and problem

My application was integrated with single sign on (SSO) application.

Both applications are developed in rails (SSO, Normal application (i.e
second))

If any user logged into sso application he can directly access the
second application.

If any one try to access the second application , it will automatically
redirect to sso application (i.e login page).

I have written the stories successfully for sso application.

but when we write the stories to second application we getting the
problems regarding session.

I.e in my application every controller having before_filter
:login_required which was defined in the plugins(in both applications)

We are checking the sessions and cookies in the method

When we call the actions from second application , it checking the
sessions and cookies but it don't find anything

so we are getting the problem

we have tried directly to assign the session variables in given block of
story

i.e request.session['current_user'] = User.find(1)
controller.stub!:)login_required).and_return(@user)
template.stub!:)login_required).and_return(@user)

We did't solve this issue in stories ,

(FYI we have solved this issue in rspecs using the
controller.stub!:)login_required).and_return(@user))

main problem is we are unable to access the session variables in the
story (i.e in the when block)


Please give your ideas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top