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