Guest User

Untitled

a guest
May 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. ## languages_controller_test.rb
  2.  
  3. # test causing following payment test to fail
  4. def test_should_save_language_to_database_for_logged_in_user
  5. login_as :basic_user
  6. post :create, :language => "fr"
  7. current_user = users(:basic_user)
  8. current_user.reload
  9. assert_equal "fr", users(:basic_user).language
  10. end
  11.  
  12. ## payments_controller_test.rb
  13.  
  14. # failing test
  15. def test_validation_message_on_blank_payment_type
  16. i = invoices(:unpaid_invoice_1)
  17. post :create, :payment => { :invoice_id => i.id, :customer_id => 25, :pay_type => '', :amount => 1, :created_by_id => users(:user_for_payments).id }
  18. assert_response :success
  19. assert @response.body.include?("Pay type is not included in the list")
  20. end
Add Comment
Please, Sign In to add comment