Liking cljdoc? Tell your friends :D
Clojure only.

common-pg-queue.producer-mock


new-producer-mockclj

(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))
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close