Sha256: ee44821b146f3a11562fb060a3a47d03ca68b5f9c7e776b50e75d12f969c485a

Contents?: true

Size: 898 Bytes

Versions: 3

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: 'C018Y6VH39D', 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

3 entries across 3 versions & 1 rubygems

Version Path
slack-ruby-client-0.17.0 spec/slack/web/api/mixins/conversations_list_spec.rb
slack-ruby-client-0.16.0 spec/slack/web/api/mixins/conversations_list_spec.rb
slack-ruby-client-0.15.1 spec/slack/web/api/mixins/conversations_list_spec.rb