BigW Consortium Gitlab

Fix rpsec all matchers in ClustersController specs

parent fbe130e1
...@@ -53,14 +53,14 @@ describe Projects::ClustersController do ...@@ -53,14 +53,14 @@ describe Projects::ClustersController do
context 'when only enabled clusters are requested' do context 'when only enabled clusters are requested' do
it 'returns only enabled clusters' do it 'returns only enabled clusters' do
get :index, namespace_id: project.namespace, project_id: project, scope: 'active' get :index, namespace_id: project.namespace, project_id: project, scope: 'active'
expect(assigns(:clusters)).to all(&:enabled) expect(assigns(:clusters)).to all(have_attributes(enabled: true))
end end
end end
context 'when only disabled clusters are requested' do context 'when only disabled clusters are requested' do
it 'returns only disabled clusters' do it 'returns only disabled clusters' do
get :index, namespace_id: project.namespace, project_id: project, scope: 'inactive' get :index, namespace_id: project.namespace, project_id: project, scope: 'inactive'
expect(assigns(:clusters)).to all { |cluster| !cluster.enabled } expect(assigns(:clusters)).to all(have_attributes(enabled: false))
end end
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment