Skip to content

Instantly share code, notes, and snippets.

@AVGP
Created January 29, 2012 20:52
Show Gist options
  • Save AVGP/1700581 to your computer and use it in GitHub Desktop.
Save AVGP/1700581 to your computer and use it in GitHub Desktop.
describe "IntelligentForwardings" do
describe " on unauthorized access" do
it "should redirect back to original page" do
user = Factory(:user)
visit edit_user_path(user)
#Redirect 1: To the login path
fill_in :email, :with => user.email
fill_in :password, :with => user.raw_password
click_button
#Redirect 2: Back to edit path
response.should render_template("users/edit")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment