Commit ebbae5d3 authored by Sean Arnold's avatar Sean Arnold

Tweak spec and changelog title

parent 59b3d364
--- ---
title: Add Missed SLA label via Cron job title: Schedule adding "Missed SLA" label to issues
merge_request: 44546 merge_request: 44546
author: author:
type: added type: added
...@@ -17,7 +17,7 @@ RSpec.describe IssuableSla do ...@@ -17,7 +17,7 @@ RSpec.describe IssuableSla do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let_it_be_with_reload(:issue) { create(:issue, project: project) } let_it_be_with_reload(:issue) { create(:issue, project: project) }
let_it_be_with_reload(:issuable_sla) { create(:issuable_sla, issue: issue, due_at: Time.current - 1.hour) } let_it_be_with_reload(:issuable_sla) { create(:issuable_sla, issue: issue, due_at: 1.hour.ago) }
context 'issue closed' do context 'issue closed' do
before do before do
...@@ -30,14 +30,16 @@ RSpec.describe IssuableSla do ...@@ -30,14 +30,16 @@ RSpec.describe IssuableSla do
context 'issue opened' do context 'issue opened' do
context 'due_at has not passed' do context 'due_at has not passed' do
before do before do
issuable_sla.update!(due_at: Time.current + 1.hour) issuable_sla.update!(due_at: 1.hour.from_now)
end end
it { is_expected.to be_empty } it { is_expected.to be_empty }
end end
context 'when due date has passed' do
it { is_expected.to contain_exactly(issuable_sla) } it { is_expected.to contain_exactly(issuable_sla) }
end end
end 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