diff options
Diffstat (limited to 'spec/controllers/autocomplete_controller_spec.rb')
-rw-r--r-- | spec/controllers/autocomplete_controller_spec.rb | 20 |
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 |