forked from manveru/ramaze
-
Notifications
You must be signed in to change notification settings - Fork 37
Following redirects
Michel Blanc edited this page Aug 11, 2012
·
1 revision
If a controller returns a redirect for a request, you can follow the redirect and fetch the new page using follow_redirect!
:
should 'add album for an artist' do
post('/album/save',
:artist => 12,
:title => "Yorick's ballads",
:style => 'Deutch Folk').status.should == 302
last_response['Content-Type'].should == 'text/html'
follow_redirect!
last_response['Content-Type'].should == 'text/html'
last_response.should =~ /Album created successfully/
end
- Website
- Google Groups
- User Guide
- [#ramaze on the Freenode network] (http://webchat.freenode.net/?channels=ramaze)