mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 15:50:13 +01:00
fix failing tests
Includes a monkey patch for Arel that may need to be removed when 4.0.0 final ships
This commit is contained in:
parent
80974fb0d5
commit
08498fee4f
10 changed files with 50 additions and 43 deletions
|
|
@ -38,10 +38,10 @@ class UsersControllerTest < ActionController::TestCase
|
|||
|
||||
def test_destroy_user
|
||||
login_as :admin_user
|
||||
@no_users_before = User.find(:all).size
|
||||
@no_users_before = User.count
|
||||
user_id = users(:ldap_user).id
|
||||
xhr :post, :destroy, :id => user_id.to_param
|
||||
assert_equal @no_users_before-1, User.find(:all).size
|
||||
assert_equal @no_users_before-1, User.count
|
||||
end
|
||||
|
||||
def test_update_password_successful
|
||||
|
|
@ -67,7 +67,7 @@ class UsersControllerTest < ActionController::TestCase
|
|||
login_as :admin_user
|
||||
post :update_password, :id => users(:admin_user).id, :user => {:password => 'newpassword', :password_confirmation => 'wrong'}
|
||||
assert_redirected_to change_password_user_path(users(:admin_user))
|
||||
assert_equal 'Validation failed: Password doesn\'t match confirmation', flash[:error]
|
||||
assert_equal 'Validation failed: Password confirmation doesn\'t match confirmation', flash[:error]
|
||||
end
|
||||
|
||||
def test_update_password_validation_errors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue