diff options
Diffstat (limited to 'users/test')
-rw-r--r-- | users/test/functional/users_controller_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/users/test/functional/users_controller_test.rb b/users/test/functional/users_controller_test.rb index ce17500..b31a642 100644 --- a/users/test/functional/users_controller_test.rb +++ b/users/test/functional/users_controller_test.rb @@ -45,11 +45,12 @@ class UsersControllerTest < ActionController::TestCase assert_equal user, assigns[:user] end - test "should process updated params" do + test "user can change settings" do user = find_record User user.expects(:attributes=).with(user.params) user.expects(:changed?).returns(true) user.expects(:save).returns(true) + user.expects(:reload).returns(user) login user put :update, :user => user.params, :id => user.id, :format => :json @@ -64,6 +65,7 @@ class UsersControllerTest < ActionController::TestCase user.expects(:attributes=).with(user.params) user.expects(:changed?).returns(true) user.expects(:save).returns(true) + user.expects(:reload).returns(user) login :is_admin? => true put :update, :user => user.params, :id => user.id, :format => :json |