diff options
author | Matija Čupić <matteeyah@gmail.com> | 2017-12-05 15:07:07 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2017-12-05 15:07:07 +0100 |
commit | 85305061c9c4083065e0ea5e47858ef8f1ef351a (patch) | |
tree | 0467f6733a0b48a509aa326c084a9cadc3827e97 /spec | |
parent | daceafc4402729f479d7ae578efc6f31d461e552 (diff) | |
download | gitlab-ce-85305061c9c4083065e0ea5e47858ef8f1ef351a.tar.gz |
Remove redundant view_clusters assignment
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/projects/clusters_controller_spec.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/controllers/projects/clusters_controller_spec.rb b/spec/controllers/projects/clusters_controller_spec.rb index 64e62411c9e..9e467633972 100644 --- a/spec/controllers/projects/clusters_controller_spec.rb +++ b/spec/controllers/projects/clusters_controller_spec.rb @@ -53,16 +53,14 @@ describe Projects::ClustersController do context 'when only enabled clusters are requested' do it 'returns only enabled clusters' do get :index, namespace_id: project.namespace, project_id: project, scope: 'active' - view_clusters = assigns(:clusters) - expect(view_clusters.all? { |cluster| cluster.enabled == true }).to eq(true) + expect(assigns(:clusters)).to all(&:enabled) end end context 'when only disabled clusters are requested' do it 'returns only disabled clusters' do get :index, namespace_id: project.namespace, project_id: project, scope: 'inactive' - view_clusters = assigns(:clusters) - expect(view_clusters.all? { |cluster| cluster.enabled == false }).to eq(true) + expect(assigns(:clusters)).to all { |cluster| !cluster.enabled } end end end |