Sha256: 19d2c85c2f9746332786489133fd75755ca2f5a458a811aa99df4726bdff29df

Contents?: true

Size: 1.73 KB

Versions: 2

Compression:

Stored size: 1.73 KB

Contents

# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

require 'spec_helper'

RSpec.describe Slack::Web::Api::Endpoints::AdminUsergroups do
  let(:client) { Slack::Web::Client.new }
  context 'admin.usergroups_addChannels' do
    it 'requires channel_ids' do
      expect { client.admin_usergroups_addChannels(usergroup_id: 'S00000000') }.to raise_error ArgumentError, /Required arguments :channel_ids missing/
    end
    it 'requires usergroup_id' do
      expect { client.admin_usergroups_addChannels(channel_ids: 'C00000000,C00000001') }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
    end
  end
  context 'admin.usergroups_addTeams' do
    it 'requires team_ids' do
      expect { client.admin_usergroups_addTeams(usergroup_id: 'S12345678') }.to raise_error ArgumentError, /Required arguments :team_ids missing/
    end
    it 'requires usergroup_id' do
      expect { client.admin_usergroups_addTeams(team_ids: 'T12345678,T98765432') }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
    end
  end
  context 'admin.usergroups_listChannels' do
    it 'requires usergroup_id' do
      expect { client.admin_usergroups_listChannels }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
    end
  end
  context 'admin.usergroups_removeChannels' do
    it 'requires channel_ids' do
      expect { client.admin_usergroups_removeChannels(usergroup_id: 'S00000000') }.to raise_error ArgumentError, /Required arguments :channel_ids missing/
    end
    it 'requires usergroup_id' do
      expect { client.admin_usergroups_removeChannels(channel_ids: 'C00000000,C00000001') }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slack-ruby-client-0.15.1 spec/slack/web/api/endpoints/admin_usergroups_spec.rb
slack-ruby-client-0.15.0 spec/slack/web/api/endpoints/admin_usergroups_spec.rb