Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 00:08:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 00:08:05 +0300
commitabae8f34f377519946a91101ef7abf504454531c (patch)
tree359fab0082860b6850d4a0a492b8f12eb3d4eb0b /spec/controllers/profiles_controller_spec.rb
parent580622bdb3c762a8e89facd8a3946881ee480442 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/profiles_controller_spec.rb')
-rw-r--r--spec/controllers/profiles_controller_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/controllers/profiles_controller_spec.rb b/spec/controllers/profiles_controller_spec.rb
index f0d83bb6bbd..d6d2c73d049 100644
--- a/spec/controllers/profiles_controller_spec.rb
+++ b/spec/controllers/profiles_controller_spec.rb
@@ -14,7 +14,7 @@ describe ProfilesController, :request_store do
params: { user: { password: 'hello12345', password_confirmation: 'hello12345' } }
end.not_to change { user.reload.encrypted_password }
- expect(response.status).to eq(302)
+ expect(response).to have_gitlab_http_status(:found)
end
end
@@ -27,7 +27,7 @@ describe ProfilesController, :request_store do
user.reload
- expect(response.status).to eq(302)
+ expect(response).to have_gitlab_http_status(:found)
expect(user.unconfirmed_email).to eq('john@gmail.com')
end
@@ -41,7 +41,7 @@ describe ProfilesController, :request_store do
user.reload
- expect(response.status).to eq(302)
+ expect(response).to have_gitlab_http_status(:found)
expect(user.unconfirmed_email).to eq nil
end
@@ -58,7 +58,7 @@ describe ProfilesController, :request_store do
ldap_user.reload
- expect(response.status).to eq(302)
+ expect(response).to have_gitlab_http_status(:found)
expect(ldap_user.unconfirmed_email).not_to eq('john@gmail.com')
end
@@ -75,7 +75,7 @@ describe ProfilesController, :request_store do
ldap_user.reload
- expect(response.status).to eq(302)
+ expect(response).to have_gitlab_http_status(:found)
expect(ldap_user.unconfirmed_email).not_to eq('john@gmail.com')
expect(ldap_user.name).not_to eq('John')
expect(ldap_user.location).to eq('City, Country')
@@ -114,7 +114,7 @@ describe ProfilesController, :request_store do
user.reload
- expect(response.status).to eq(302)
+ expect(response).to have_gitlab_http_status(:found)
expect(user.username).to eq(new_username)
end
@@ -127,7 +127,7 @@ describe ProfilesController, :request_store do
},
format: :json
- expect(response.status).to eq(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response['message']).to eq(s_('Profiles|Username successfully changed'))
end
@@ -140,7 +140,7 @@ describe ProfilesController, :request_store do
},
format: :json
- expect(response.status).to eq(422)
+ expect(response).to have_gitlab_http_status(:unprocessable_entity)
expect(json_response['message']).to match(/Username change failed/)
end
@@ -162,7 +162,7 @@ describe ProfilesController, :request_store do
user.reload
- expect(response.status).to eq(302)
+ expect(response).to have_gitlab_http_status(:found)
expect(gitlab_shell.repository_exists?(project.repository_storage, "#{new_username}/#{project.path}.git")).to be_truthy
end
end
@@ -180,7 +180,7 @@ describe ProfilesController, :request_store do
user.reload
- expect(response.status).to eq(302)
+ expect(response).to have_gitlab_http_status(:found)
expect(gitlab_shell.repository_exists?(project.repository_storage, "#{project.disk_path}.git")).to be_truthy
expect(before_disk_path).to eq(project.disk_path)
end