Can't assert that job is deleted

13 views
Skip to first unread message

Ivailo Bardarov

unread,
Jun 23, 2015, 3:44:47 PM6/23/15
to sid...@googlegroups.com
My goal is to assert that a job is deleted.

If I use Sidekiq::ScheduledSet.new in fake! test mode the jobs is not populated with the jobs

and if I use DummyWorker.jobs then:
1. the job is presented as hash and checking for the klass type is different from ScheduledSet way retri[:klass] != retri.klass
2. the delete method doesn't remove the job from the DummyWorker.jobs

In the docs/code there is no example how to test that the jobs is deleted. How do you assert this?

Maybe the #jobs way should start obey the delete method?

Mike Perham

unread,
Jun 23, 2015, 3:55:24 PM6/23/15
to sid...@googlegroups.com
The API does not support a test mode; it always runs against a live Redis.  Instead you can assert that Sidekiq's API is called.

--
You received this message because you are subscribed to the Google Groups "Sidekiq" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sidekiq+u...@googlegroups.com.
To post to this group, send email to sid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sidekiq/be07ad31-9757-410c-9ada-bc94ea049b41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Mike Perham – CEO, Contributed Systems
Smart, effective open source infrastructure for your apps.
Reply all
Reply to author
Forward
0 new messages