Commit 42f02648 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch '222520-tweak-spec-attribute-names' into 'master'

Update spec names to be more appropriate

Closes #222520

See merge request gitlab-org/gitlab!37282
parents cc2ba100 e367b443
......@@ -5,9 +5,9 @@ require 'spec_helper'
RSpec.describe Gitlab::AlertManagement::AlertStatusCounts do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:alert_1) { create(:alert_management_alert, :resolved, project: project) }
let_it_be(:alert_2) { create(:alert_management_alert, :ignored, project: project) }
let_it_be(:alert_3) { create(:alert_management_alert) }
let_it_be(:alert_resolved) { create(:alert_management_alert, :resolved, project: project) }
let_it_be(:alert_ignored) { create(:alert_management_alert, :ignored, project: project) }
let_it_be(:alert_triggered) { create(:alert_management_alert) }
let(:params) { {} }
describe '#execute' do
......@@ -52,7 +52,7 @@ RSpec.describe Gitlab::AlertManagement::AlertStatusCounts do
end
context 'when search param is included' do
let(:params) { { search: alert_1.title } }
let(:params) { { search: alert_resolved.title } }
it 'returns the correct countss' do
expect(counts.open).to eq(0)
......
......@@ -6,8 +6,8 @@ RSpec.describe 'getting Alert Management Alert counts by status' do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:current_user) { create(:user) }
let_it_be(:alert_1) { create(:alert_management_alert, :resolved, project: project) }
let_it_be(:alert_2) { create(:alert_management_alert, project: project) }
let_it_be(:alert_resolved) { create(:alert_management_alert, :resolved, project: project) }
let_it_be(:alert_triggered) { create(:alert_management_alert, project: project) }
let_it_be(:other_project_alert) { create(:alert_management_alert) }
let(:params) { {} }
......@@ -58,7 +58,7 @@ RSpec.describe 'getting Alert Management Alert counts by status' do
end
context 'with search criteria' do
let(:params) { { search: alert_1.title } }
let(:params) { { search: alert_resolved.title } }
it_behaves_like 'a working graphql query'
it 'returns the correct counts for each status' do
......
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