Sha256: 3cf1b530189c03b8c0c8b347423dd16addba0cbbd2af18a7548da52c56de3aaf
Contents?: true
Size: 651 Bytes
Versions: 25
Compression:
Stored size: 651 Bytes
Contents
require "spec_helper" RSpec.describe CanvasSync::Concerns::LiveEventSync do before(:all) do User.include(CanvasSync::Concerns::LiveEventSync) end let(:event) { { "metadata" => { event_name: "user_created", }, "payload" => { user_id: 124, }, } } describe "#perform" do it "determines ID from payload" do expect_any_instance_of(User).to receive(:process_live_event).with(:created, event["payload"], event["metadata"]) do |user, *args| expect(user.canvas_id).to eql 124 end User.cs_internal_process_live_event(event.with_indifferent_access) end end end
Version data entries
25 entries across 25 versions & 1 rubygems