Sha256: 47e2ad23a3824bc22579223c3ede027172d698a47471fa21b09ebf78079a5809

Contents?: true

Size: 539 Bytes

Versions: 8

Compression:

Stored size: 539 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'

RSpec.describe Slack::RealTime::Client, vcr: { cassette_name: 'web/rtm_start' } do
  include_context 'connected client'

  describe '#message' do
    before do
      allow(client).to receive(:next_id).and_return(42)
    end

    it 'sends message' do
      expect(socket).to(
        receive(:send_data)
          .with({ type: 'message', id: 42, text: 'hello world', channel: 'channel' }.to_json)
      )
      client.message(text: 'hello world', channel: 'channel')
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
slack-ruby-client-1.1.0 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-1.0.0 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.17.0 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.16.0 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.15.1 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.15.0 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.14.6 spec/slack/real_time/api/message_spec.rb
slack-ruby-client-0.14.5 spec/slack/real_time/api/message_spec.rb