Sha256: 3613b5dbd52b1e019e79370f9c78fdd227dab7f81b1e917859e64359b4087743

Contents?: true

Size: 800 Bytes

Versions: 15

Compression:

Stored size: 800 Bytes

Contents

require 'spec_helper'

RSpec.describe Slack::Web::Api::Endpoints::Users do
  let(:client) { Slack::Web::Client.new }
  context 'users' do
    it 'list', vcr: { cassette_name: 'web/users_list' } do
      json = client.users_list(presence: true)
      expect(json.ok).to be true
      expect(json.members.size).to eq 9
      expect(json.members.first.presence).to eq 'away'
    end
    it 'info', vcr: { cassette_name: 'web/users_info' } do
      json = client.users_info(user: '@aws')
      expect(json.user.name).to eq 'aws'
    end
    it 'search', vcr: { cassette_name: 'web/users_info' } do
      json = client.users_search(user: 'aws')
      expect(json.ok).to be true
      expect(json.members.size).to eq 1
      expect(json.members.first.name).to eq 'aws'
    end if defined?(Picky)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
slack-ruby-client-0.9.1 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.9.0 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.8.1 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.8.0 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.7.9 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.7.8 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.7.7 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.7.6 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.7.5 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.7.4 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.7.3 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.7.2 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.7.1 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.7.0 spec/slack/web/api/endpoints/custom_specs/users_spec.rb
slack-ruby-client-0.6.0 spec/slack/web/api/endpoints/custom_specs/users_spec.rb