I think you can also use:
post "/authentication/login",
{ :login => user_email,
:password => password },
:host => "company.example.com"
Op 5-mrt-08, om 23:30 heeft Bastien het volgende geschreven:
> I've just begin using rspec stories, and i m encountering some
> problems. In my application i have different subdomains in which
> specific users can log in, for example an admin will go to
> admin.myapp.com/authenticate/login, and an user belonging to a
> specific company will log in company.myapp.com/authenticate/login, and
> of course both have a different login process.
>
> To perform some actions the user has to be logged in, and this is
> where the problem comes, how to test these actions ?
>
> - Is there a way to set a user as logged in ? (that would definitely
> be very convenient)
>
> So far I have tried to do the following :
>
> post "/authenticate/login",
> {:login => user_email,
> :password => password }
>
> but the problem is that it doesn't use the correct subdomain and the
> login, as expected in that case, fails, so how to define the correct
> subdomain ?
>
> Thank you in advance for your help.
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users