I can't be of any help in regards to the integration itself, but if you are
forced to go the route of performing an actual authentication request
through capybara, you may be interested to look at
https://github.com/myronmarston/vcr which can capture any request to an
external service made by your app when testing (here, the actual
request/response in the auth cycle), and 'play it back' so you're
essentially actually stubbing the auth request/response, rather than
stubbing the authenticated state.

Cheers,
Jeremy

On 12 June 2011 22:08, Joshua McArthur <[email protected]> wrote:

> Hi all,
>
> Just a quick question to ask if anyone's had any luck integration
> testing Omniauth with Devise, when the User is in a logged-in state.
>
> I've got Omniauth's test mode on, and appropriate OAuth providers
> stubbed out thanks to Omniauth's testing support. Unfortunately, said
> testing support is replacing my session (i.e. logged-in user) with
> it's own session class, so I get bounced out of the app I'm testing
> when it redirects to the Omniauth callback and notices "I'm not logged
> in".
>
> Haven't found anything as yet that suggests I can easily get around
> this, so any advice is welcome! I think the alternative would be to
> move this into a controller spec, or to try and get Capybara right
> through an OAuth log-in-and-grant-permissions interface on the site of
> the third-party OAuth provider - and I can see that being really
> messy.
>
> Cheers,
>
> Josh
>
> --
> You received this message because you are subscribed to the Google Groups
> "WellRailed" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/wellrailed?hl=en.
>
>


-- 
Jeremy Olliver

-- 
You received this message because you are subscribed to the Google Groups 
"WellRailed" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/wellrailed?hl=en.

Reply via email to