Sha256: 45cd03ea7864572bf2a4c1b5b0de486d0400a0a8b643f8dd3493a7adeddb0a16
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
require "spec_helper" describe G5Updatable::ClientFeedProcessorWorker, "#perform" do let(:params) { { client_uid: 'bar', location_uid: 'foo' } } let(:processor) { double(:processor, work: nil) } it { is_expected.to be_processed_in :g5_updatable } context "hash with symbol keys" do let(:params) { { client_uid: 'bar', location_uid: 'foo' } } before do expect(G5Updatable::ClientFeedProcessor).to receive(:new) .with(hash_including(client_uid: 'bar', location_uid: 'foo')) .and_return(processor) described_class.new.perform(params) end it 'invokes the processor' do expect(processor).to have_received(:work) end end context "hash with string keys" do let(:params) { { 'client_uid' => 'bar', 'location_uid' => 'foo' } } before do expect(G5Updatable::ClientFeedProcessor).to receive(:new) .with(hash_including(client_uid: 'bar', location_uid: 'foo')) .and_return(processor) described_class.new.perform(params) end it 'invokes the processor' do expect(processor).to have_received(:work) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
g5_updatable-1.0.2.pre.1 | spec/workers/g5_updatable/client_feed_processor_worker_spec.rb |