summaryrefslogtreecommitdiff
path: root/spec/controllers/autocomplete_controller_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-27 12:08:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-27 12:08:35 +0000
commit22e9af3c8b8aedf7f46b786be968862b74a2d07e (patch)
treea10a7d9af40a17fe6cda7b3a681f5e5e2112c16e /spec/controllers/autocomplete_controller_spec.rb
parentc8e28a0bb8dd45d91cb72ff2c930bc4a562f1fc7 (diff)
downloadgitlab-ce-22e9af3c8b8aedf7f46b786be968862b74a2d07e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/autocomplete_controller_spec.rb')
-rw-r--r--spec/controllers/autocomplete_controller_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/controllers/autocomplete_controller_spec.rb b/spec/controllers/autocomplete_controller_spec.rb
index 51f20bae880..1ebbeecc583 100644
--- a/spec/controllers/autocomplete_controller_spec.rb
+++ b/spec/controllers/autocomplete_controller_spec.rb
@@ -32,7 +32,7 @@ describe AutocompleteController do
get(:users, params: { project_id: 'unknown' })
end
- it { expect(response).to have_gitlab_http_status(404) }
+ it { expect(response).to have_gitlab_http_status(:not_found) }
end
end
@@ -61,7 +61,7 @@ describe AutocompleteController do
get(:users, params: { group_id: 'unknown' })
end
- it { expect(response).to have_gitlab_http_status(404) }
+ it { expect(response).to have_gitlab_http_status(:not_found) }
end
end
@@ -140,7 +140,7 @@ describe AutocompleteController do
get(:users, params: { project_id: project.id })
end
- it { expect(response).to have_gitlab_http_status(404) }
+ it { expect(response).to have_gitlab_http_status(:not_found) }
end
describe 'GET #users with unknown project' do
@@ -148,7 +148,7 @@ describe AutocompleteController do
get(:users, params: { project_id: 'unknown' })
end
- it { expect(response).to have_gitlab_http_status(404) }
+ it { expect(response).to have_gitlab_http_status(:not_found) }
end
describe 'GET #users with inaccessible group' do
@@ -157,7 +157,7 @@ describe AutocompleteController do
get(:users, params: { group_id: user.namespace.id })
end
- it { expect(response).to have_gitlab_http_status(404) }
+ it { expect(response).to have_gitlab_http_status(:not_found) }
end
describe 'GET #users with no project' do
@@ -372,7 +372,7 @@ describe AutocompleteController do
it 'returns empty json' do
get :merge_request_target_branches, params: { project_id: project.id }
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response).to be_empty
end
end
@@ -383,7 +383,7 @@ describe AutocompleteController do
get :merge_request_target_branches, params: { project_id: project.id }
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response).to be_empty
end
end
@@ -404,7 +404,7 @@ describe AutocompleteController do
get :merge_request_target_branches, params: params
- expect(response).to have_gitlab_http_status(400)
+ expect(response).to have_gitlab_http_status(:bad_request)
expect(json_response).to eq({ 'error' => 'At least one of group_id or project_id must be specified' })
end
end
@@ -416,7 +416,7 @@ describe AutocompleteController do
get :merge_request_target_branches, params: { project_id: project.id }
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response).to contain_exactly({ 'title' => 'feature' })
end
end
@@ -433,7 +433,7 @@ describe AutocompleteController do
get :merge_request_target_branches, params: { group_id: group.id }
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response).to contain_exactly({ 'title' => 'feature' })
end
end