Permalink
Browse files

Add test to verify that signin twice redirect to the profile page

  • Loading branch information...
1 parent 5673556 commit b2b07e92515279ab2e0cc1e7d970c4ab4ff5376d Olivier SCHNEIDER committed Mar 10, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 spec/requests/authentication_pages_spec.rb
@@ -108,6 +108,19 @@
it "should render the desired protected page" do
page.should have_title('Edit user')
end
+
+ describe "when signing in again" do
+ before do
+ visit signin_path(user)
+ fill_in "Email", with: user.email
+ fill_in "Password", with: user.password
+ click_button "Sign in"
+ end
+
+ it "should render the profile page" do
+ page.should have_title(user.name)
+ end
+ end
end
end
end

0 comments on commit b2b07e9

Please sign in to comment.