From ee3b2be02532f952d7b651e51f3c42afd277b3d0 Mon Sep 17 00:00:00 2001 From: Markus Doits Date: Wed, 25 Mar 2020 22:22:02 +0100 Subject: [PATCH] add failing spec for issue #2299 --- spec/rspec/rails/matchers/active_job_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/rspec/rails/matchers/active_job_spec.rb b/spec/rspec/rails/matchers/active_job_spec.rb index 06ff55e23e..08f122cdeb 100644 --- a/spec/rspec/rails/matchers/active_job_spec.rb +++ b/spec/rspec/rails/matchers/active_job_spec.rb @@ -216,6 +216,13 @@ def self.name; "LoggingJob"; end }.to have_enqueued_job.at(date) end + it "passes with provided at time" do + date = Time.current + 1.day + expect { + hello_job.set(wait_until: date).perform_later + }.to have_enqueued_job.at(date) + end + it "accepts composable matchers as an at date" do future = 1.minute.from_now slightly_earlier = 58.seconds.from_now