From cd47987b05bb9aa437f7dade94ea9673643a6e4d Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 7 Oct 2019 23:27:09 -0500 Subject: [PATCH] tests: fixup tests for cc4e39b88. --- test/functional/application_controller_test.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/functional/application_controller_test.rb b/test/functional/application_controller_test.rb index 33dbf1b4b..eadee8f73 100644 --- a/test/functional/application_controller_test.rb +++ b/test/functional/application_controller_test.rb @@ -57,7 +57,7 @@ class ApplicationControllerTest < ActionDispatch::IntegrationTest should "fail for api key mismatches" do basic_auth_string = "Basic #{::Base64.encode64("#{@user.name}:badpassword")}" - get edit_user_path(@user), headers: { HTTP_AUTHORIZATION: basic_auth_string } + get profile_path, as: :json, headers: { HTTP_AUTHORIZATION: basic_auth_string } assert_response 401 end @@ -77,13 +77,13 @@ class ApplicationControllerTest < ActionDispatch::IntegrationTest end should "fail for api key mismatches" do - get edit_user_path(@user), params: { login: @user.name } + get profile_path, as: :json, params: { login: @user.name } assert_response 401 - get edit_user_path(@user), params: { api_key: @api_key.key } + get profile_path, as: :json, params: { api_key: @api_key.key } assert_response 401 - get edit_user_path(@user), params: { login: @user.name, api_key: "bad" } + get profile_path, as: :json, params: { login: @user.name, api_key: "bad" } assert_response 401 end @@ -102,13 +102,13 @@ class ApplicationControllerTest < ActionDispatch::IntegrationTest end should "fail for password mismatches" do - get edit_user_path(@user), params: { login: @user.name } + get profile_path, as: :json, params: { login: @user.name } assert_response 401 - get edit_user_path(@user), params: { password_hash: User.sha1("password") } + get profile_path, as: :json, params: { password_hash: User.sha1("password") } assert_response 401 - get edit_user_path(@user), params: { login: @user.name, password_hash: "bad" } + get profile_path, as: :json, params: { login: @user.name, password_hash: "bad" } assert_response 401 end