spec/acfs/runner_spec.rb in acfs-0.37.0.1.b295 vs spec/acfs/runner_spec.rb in acfs-0.38.0

- old
+ new

@@ -67,6 +67,27 @@ runner.run ::Acfs::Operation.new MyUser, :read, params: {id: 0} expect(collector.events).to have(1).items end end end + + describe '#run' do + before do + expect_any_instance_of(UserService).to receive(:prepare).and_return nil + end + it 'it should not do requests when a middleware aborted' do + expect(adapter).to_not receive :run + runner.run ::Acfs::Operation.new MyUser, :read, params: {id: 0} + end + end + + describe '#enqueue' do + before do + expect_any_instance_of(UserService).to receive(:prepare).and_return nil + end + it 'it should not do requests when a middleware aborted' do + expect(adapter).to_not receive :queue + runner.enqueue ::Acfs::Operation.new MyUser, :read, params: {id: 0} + runner.start + end + end end