diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-21 12:09:23 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-21 12:09:23 +0300 |
commit | 03755fb38f58c7a2e8f4b2c10847974dab964977 (patch) | |
tree | 4e00494089cc8dccb19696b970e8157ad65fa58e /spec/controllers | |
parent | 94b90db5479a4536d459d8e6beaeaea376f6b356 (diff) | |
parent | 5a4c56c38dd7aef414582edb880b343bf67b65b8 (diff) |
Merge branch 'ee-flog' into 'master'
Reduce method complexity in AutocompleteController
Backport of gitlab-org/gitlab-ee!58
See merge request !1833
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/autocomplete_controller_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/controllers/autocomplete_controller_spec.rb b/spec/controllers/autocomplete_controller_spec.rb index aa8d6cb807f..85379a8e984 100644 --- a/spec/controllers/autocomplete_controller_spec.rb +++ b/spec/controllers/autocomplete_controller_spec.rb @@ -114,7 +114,7 @@ describe AutocompleteController do get(:users, project_id: project.id) end - it { expect(response.status).to eq(302) } + it { expect(response.status).to eq(404) } end describe 'GET #users with unknown project' do @@ -122,7 +122,7 @@ describe AutocompleteController do get(:users, project_id: 'unknown') end - it { expect(response.status).to eq(302) } + it { expect(response.status).to eq(404) } end describe 'GET #users with inaccessible group' do @@ -131,7 +131,7 @@ describe AutocompleteController do get(:users, group_id: user.namespace.id) end - it { expect(response.status).to eq(302) } + it { expect(response.status).to eq(404) } end describe 'GET #users with no project' do @@ -139,7 +139,8 @@ describe AutocompleteController do get(:users) end - it { expect(response.status).to eq(302) } + it { expect(body).to be_kind_of(Array) } + it { expect(body.size).to eq 0 } end end end |