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
author:
type: added
......@@ -17,7 +17,7 @@ RSpec.describe IssuableSla do
let_it_be(:project) { create(: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
before do
......@@ -30,13 +30,15 @@ RSpec.describe IssuableSla do
context 'issue opened' do
context 'due_at has not passed' do
before do
issuable_sla.update!(due_at: Time.current + 1.hour)
issuable_sla.update!(due_at: 1.hour.from_now)
end
it { is_expected.to be_empty }
end
it { is_expected.to contain_exactly(issuable_sla) }
context 'when due date has passed' do
it { is_expected.to contain_exactly(issuable_sla) }
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