Sha256: 2051d87437bb93a08f0c7efbfa02f951bddf4d55f40617109e95317897831ab0

Contents?: true

Size: 1.71 KB

Versions: 3

Compression:

Stored size: 1.71 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::AdminRoles do
  let(:client) { Slack::Web::Client.new }
  context 'admin.roles_addAssignments' do
    it 'requires entity_ids' do
      expect { client.admin_roles_addAssignments(role_id: %q[R0001], user_ids: %q[['U00000001', 'U00000002', 'U00000003']]) }.to raise_error ArgumentError, /Required arguments :entity_ids missing/
    end
    it 'requires role_id' do
      expect { client.admin_roles_addAssignments(entity_ids: %q[['T00000001', 'E00000002']], user_ids: %q[['U00000001', 'U00000002', 'U00000003']]) }.to raise_error ArgumentError, /Required arguments :role_id missing/
    end
    it 'requires user_ids' do
      expect { client.admin_roles_addAssignments(entity_ids: %q[['T00000001', 'E00000002']], role_id: %q[R0001]) }.to raise_error ArgumentError, /Required arguments :user_ids missing/
    end
  end
  context 'admin.roles_removeAssignments' do
    it 'requires entity_ids' do
      expect { client.admin_roles_removeAssignments(role_id: %q[R0001], user_ids: %q[['U00000001', 'U00000002', 'U00000003']]) }.to raise_error ArgumentError, /Required arguments :entity_ids missing/
    end
    it 'requires role_id' do
      expect { client.admin_roles_removeAssignments(entity_ids: %q[['T00000001', 'E00000002']], user_ids: %q[['U00000001', 'U00000002', 'U00000003']]) }.to raise_error ArgumentError, /Required arguments :role_id missing/
    end
    it 'requires user_ids' do
      expect { client.admin_roles_removeAssignments(entity_ids: %q[['T00000001', 'E00000002']], role_id: %q[R0001]) }.to raise_error ArgumentError, /Required arguments :user_ids missing/
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 spec/slack/web/api/endpoints/admin_roles_spec.rb
slack-ruby-client-2.3.0 spec/slack/web/api/endpoints/admin_roles_spec.rb
slack-ruby-client-2.2.0 spec/slack/web/api/endpoints/admin_roles_spec.rb