secador de pelo
secador de pelo

Reputation: 699

Rails integration tests using session-store

My application is using ActiveReccord session-store with a custom session class. This is all working fine in production and development.

When running integration tests however, this does not seem to work. No Session gets created at all. As i'm depending on the custom session class, therefore i can not switch to cookie-store for testing.

Can anyone help me with this?

Upvotes: 1

Views: 605

Answers (1)

montrealmike
montrealmike

Reputation: 11631

try setting your test domain

Rails.application.config.session_store :cookie_store, key: '_yourkey', domain: Rails.env.test? ? '127.0.0.1' : 'yourdomain.com'

Upvotes: 1

Related Questions