summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2017-12-05 15:07:07 +0100
committerMatija Čupić <matteeyah@gmail.com>2017-12-05 15:07:07 +0100
commit85305061c9c4083065e0ea5e47858ef8f1ef351a (patch)
tree0467f6733a0b48a509aa326c084a9cadc3827e97 /spec/controllers
parentdaceafc4402729f479d7ae578efc6f31d461e552 (diff)
downloadgitlab-ce-85305061c9c4083065e0ea5e47858ef8f1ef351a.tar.gz
Remove redundant view_clusters assignment
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/clusters_controller_spec.rb6
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