From 7bf316e3097cfd2c87c9564ee149a83aa47ec04a Mon Sep 17 00:00:00 2001 From: Brusk Awat Date: Wed, 5 Apr 2023 23:51:27 +0300 Subject: [PATCH] Adds basic specs --- spec/outboxable_spec.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spec/outboxable_spec.rb b/spec/outboxable_spec.rb index 02b9d57..346e84b 100644 --- a/spec/outboxable_spec.rb +++ b/spec/outboxable_spec.rb @@ -1,11 +1,16 @@ # frozen_string_literal: true +require 'sidekiq/testing' RSpec.describe Outboxable do it "has a version number" do expect(Outboxable::VERSION).not_to be nil end - it "does something useful" do - expect(false).to eq(true) + context 'polling publisher sidekiq worker' do + it "should be able to perform" do + expect { + Outboxable::PollingPublisherWorker.perform_async + }.to change(Outboxable::PollingPublisherWorker.jobs, :size).by(1) + end end end