Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/commit_status_spec.rb')
-rw-r--r--spec/models/commit_status_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb
index 7134a387e65..20afddd8470 100644
--- a/spec/models/commit_status_spec.rb
+++ b/spec/models/commit_status_spec.rb
@@ -123,6 +123,16 @@ RSpec.describe CommitStatus do
end
end
+ describe '.scheduled_at_before' do
+ let!(:never_scheduled) { create(:commit_status) }
+ let!(:stale_scheduled) { create(:commit_status, scheduled_at: 1.day.ago) }
+ let!(:fresh_scheduled) { create(:commit_status, scheduled_at: 1.minute.ago) }
+
+ subject { CommitStatus.scheduled_at_before(1.hour.ago) }
+
+ it { is_expected.to contain_exactly(stale_scheduled) }
+ end
+
describe '#processed' do
subject { commit_status.processed }