Guest User

Untitled

a guest
Mar 6th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. def test_unsuccessful_login
  2. get '/login'
  3. assert_response :success
  4.  
  5. assert_tag :tag => "input", :attributes => { :id => "username" }
  6. assert_tag :tag => "input", :attributes => { :id => "password" }
  7. assert_tag :tag => "input", :attributes => { :value => "Log In" }
  8. assert_tag :tag => "a", :child => { :content => "Forgot Your Password?" }
  9.  
  10. post '/authentications/authenticate_login', :username => "site_coordinator", :password => "wrongpassword"
  11. assert_response :redirect
  12. assert_redirected_to 'login'
  13.  
  14. follow_redirect!
  15. assert_tag :tag => "p", :attributes => { :id => "notice" }
  16. end
Add Comment
Please, Sign In to add comment