Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def setup
- @cus_save = Customer.find("####")
- login
- end
- def teardown
- cus = Customer.find "####"
- cus.attributes = @cus_save.attributes
- assert cus.save!
- end
- def login
- post_via_redirect "authenticate/login", :username => @cus_save[:cus_login], :password => @cus_save[:cus_password]
- assert_equal "/", path
- assert_equal @cus_save.id, session[:id]
- get_via_redirect "customer/update_info"
- assert_equal "/customer/update_info", path
- end
Add Comment
Please, Sign In to add comment