diff options
author | Azul <azul@leap.se> | 2014-07-10 12:13:30 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-07-14 10:49:39 +0200 |
commit | 60052d15ca02b1c40ed265bed6515880d2851b8f (patch) | |
tree | e6946d2c25a04161c4f3003b1ef66ab9376938f4 /test/functional/v1 | |
parent | 091793265e23452890c6ca27fc64feb54df2ad0b (diff) |
clean up and simplify error responses and test code
Diffstat (limited to 'test/functional/v1')
-rw-r--r-- | test/functional/v1/messages_controller_test.rb | 2 | ||||
-rw-r--r-- | test/functional/v1/users_controller_test.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/v1/messages_controller_test.rb b/test/functional/v1/messages_controller_test.rb index 24a5b1f..a50fded 100644 --- a/test/functional/v1/messages_controller_test.rb +++ b/test/functional/v1/messages_controller_test.rb @@ -51,7 +51,7 @@ class V1::MessagesControllerTest < ActionController::TestCase test "fails if not authenticated" do get :index, :format => :json - assert_access_denied + assert_login_required end end diff --git a/test/functional/v1/users_controller_test.rb b/test/functional/v1/users_controller_test.rb index fe3cfe7..ffe2484 100644 --- a/test/functional/v1/users_controller_test.rb +++ b/test/functional/v1/users_controller_test.rb @@ -34,7 +34,9 @@ class V1::UsersControllerTest < ActionController::TestCase test "user cannot update other user" do user = find_record :user login - put :update, :user => record_attributes_for(:user_with_settings), :id => user.id, :format => :json + put :update, id: user.id, + user: record_attributes_for(:user_with_settings), + :format => :json assert_access_denied end |