Sha256: 7f715410997122f31c0251ab87c72544e0b95ef1cae53de64b9714f74914f604
Contents?: true
Size: 967 Bytes
Versions: 1
Compression:
Stored size: 967 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe "Xip::ScheduledReplyJob" do let(:scheduled_reply_job) { Xip::ScheduledReplyJob.new } it "should instantiate BotController with service_message, set flow and state, and route" do service_msg_double = double('service_message') expect(Xip::ServiceMessage).to receive(:new).with(service: 'twilio').and_return(service_msg_double) expect(service_msg_double).to receive(:sender_id=).with('+18885551212') expect(service_msg_double).to receive(:target_id=).with('33322') bot_controller_double = double('bot_controller') expect(BotController).to receive(:new).with(service_message: service_msg_double).and_return(bot_controller_double) expect(bot_controller_double).to receive(:step_to).with(flow: 'my_flow', state: 'say_hi') scheduled_reply_job = Xip::ScheduledReplyJob.new scheduled_reply_job.perform('twilio', '+18885551212', 'my_flow', 'say_hi', '33322') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xip-2.0.0.beta2 | spec/scheduled_reply_spec.rb |