Guest User

Untitled

a guest
Mar 15th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. def setup
  2. @cus_save = Customer.find("####")
  3. login
  4. end
  5.  
  6. def teardown
  7. cus = Customer.find "####"
  8.  
  9. cus.attributes = @cus_save.attributes
  10. assert cus.save!
  11. end
  12.  
  13. def login
  14. post_via_redirect "authenticate/login", :username => @cus_save[:cus_login], :password => @cus_save[:cus_password]
  15. assert_equal "/", path
  16. assert_equal @cus_save.id, session[:id]
  17.  
  18. get_via_redirect "customer/update_info"
  19. assert_equal "/customer/update_info", path
  20. end
Add Comment
Please, Sign In to add comment