File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
spec/rspec/rails/matchers Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ def queue_match?(job)
157157 def at_match? ( job )
158158 return true unless @at
159159 return job [ :at ] . nil? if @at == :no_wait
160+ return false unless job [ :at ]
160161
161162 values_match? ( @at , Time . at ( job [ :at ] ) )
162163 end
Original file line number Diff line number Diff line change @@ -225,6 +225,15 @@ def self.name; "LoggingJob"; end
225225 } . to have_enqueued_job . at ( :no_wait )
226226 end
227227
228+ it "has an enqueued job when providing at and there is no wait" do
229+ date = Date . tomorrow . noon
230+ expect {
231+ expect {
232+ hello_job . perform_later
233+ } . to have_enqueued_job . at ( date )
234+ } . to raise_error ( /expected to enqueue exactly 1 jobs, at .+ but enqueued 0/ )
235+ end
236+
228237 it "has an enqueued job when not providing at and there is a wait" do
229238 date = Date . tomorrow . noon
230239 expect {
You can’t perform that action at this time.
0 commit comments