X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/ce7b651eb25473b74765ccb349f37ebd4ea6edfe..483b2f204e90c657dd4e545c82f2c9094bcacc83:/test/integration/user_blocks_test.rb diff --git a/test/integration/user_blocks_test.rb b/test/integration/user_blocks_test.rb index 7003d7692..94ec46e0a 100644 --- a/test/integration/user_blocks_test.rb +++ b/test/integration/user_blocks_test.rb @@ -1,6 +1,6 @@ require File.dirname(__FILE__) + '/../test_helper' -class UserBlocksTest < ActionController::IntegrationTest +class UserBlocksTest < ActionDispatch::IntegrationTest fixtures :users, :user_blocks, :user_roles def auth_header(user, pass) @@ -17,10 +17,12 @@ class UserBlocksTest < ActionController::IntegrationTest assert_response :success # now block the user - UserBlock.create(:user_id => blocked_user.id, - :creator_id => users(:moderator_user).id, - :reason => "testing", - :ends_at => Time.now.getutc + 5.minutes) + UserBlock.create( + :user_id => blocked_user.id, + :creator_id => users(:moderator_user).id, + :reason => "testing", + :ends_at => Time.now.getutc + 5.minutes + ) get "/api/#{API_VERSION}/user/details", nil, auth_header(blocked_user.display_name, "test") assert_response :forbidden end @@ -29,10 +31,12 @@ class UserBlocksTest < ActionController::IntegrationTest blocked_user = users(:public_user) moderator = users(:moderator_user) - block = UserBlock.create(:user_id => blocked_user.id, - :creator_id => moderator.id, - :reason => "testing", - :ends_at => Time.now.getutc + 5.minutes) + block = UserBlock.create( + :user_id => blocked_user.id, + :creator_id => moderator.id, + :reason => "testing", + :ends_at => Time.now.getutc + 5.minutes + ) get "/api/#{API_VERSION}/user/details", nil, auth_header(blocked_user.display_name, "test") assert_response :forbidden