Sha256: 26c569bf946eba01210df12fa9520da575d7463a5dba16f1ca4af5b8d841ca31

Contents?: true

Size: 898 Bytes

Versions: 7

Compression:

Stored size: 898 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'

RSpec.describe Slack::Web::Client do
  context 'conversations_setTopic' do
    it 'does not invoke conversations_list', vcr: { cassette_name: 'web/conversations_setTopic' } do
      rc = subject.conversations_setTopic({ channel: 'C019CV63UTC', topic: 'new topic' })
      expect(rc.channel.topic.value).to eq 'new topic'
    end

    it 'resolves IDs via conversations_list', vcr: { cassette_name: 'web/conversations_setTopic_one_page' } do
      rc = subject.conversations_setTopic({ channel: '#1', topic: 'new topic' })
      expect(rc.channel.topic.value).to eq 'new topic'
    end

    it 'paginates to resolve IDs', vcr: { cassette_name: 'web/conversations_setTopic_paginated' } do
      rc = subject.conversations_setTopic({ channel: '#topic', topic: 'new topic' })
      expect(rc.channel.topic.value).to eq 'new topic'
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 spec/slack/web/api/mixins/conversations_list_spec.rb
slack-ruby-client-2.3.0 spec/slack/web/api/mixins/conversations_list_spec.rb
slack-ruby-client-2.2.0 spec/slack/web/api/mixins/conversations_list_spec.rb
slack-ruby-client-2.1.0 spec/slack/web/api/mixins/conversations_list_spec.rb
slack-ruby-client-2.0.0 spec/slack/web/api/mixins/conversations_list_spec.rb
slack-ruby-client-1.1.0 spec/slack/web/api/mixins/conversations_list_spec.rb
slack-ruby-client-1.0.0 spec/slack/web/api/mixins/conversations_list_spec.rb