(new-producer-mock)Creates a producer mock for tests, without touching a real Postgres. Implements the same protocols/JobProducer as the real Producer, so it's a drop-in replacement wherever protocols/enqueue! is called.
Example: (let [producer (component/start (new-producer-mock))] (protocols/enqueue! producer ::send-email {:to "a@b.com"}) (protocols/get-enqueued-jobs producer ::send-email))
Creates a producer mock for tests, without touching a real Postgres.
Implements the same protocols/JobProducer as the real Producer, so
it's a drop-in replacement wherever protocols/enqueue! is called.
Example:
(let [producer (component/start (new-producer-mock))]
(protocols/enqueue! producer ::send-email {:to "a@b.com"})
(protocols/get-enqueued-jobs producer ::send-email))cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |