Sha256: 6988076e49b3c56fc80853e6c351c1903acffb5b650496ff2d9f2436e74c26bc

Contents?: true

Size: 920 Bytes

Versions: 16

Compression:

Stored size: 920 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Zoom::Actions::Roles do
  let(:zc) { zoom_client }
  let(:args) { { role_id: 2 } }

  describe '#roles_get action' do
    before :each do
      stub_request(
        :get,
        zoom_url('/roles/2')
      ).to_return(body: json_response('roles', 'get'), headers: { 'Content-Type' => 'application/json' })
    end

    it 'returns a hash' do
      expect(zc.roles_get(args)).to be_kind_of(Hash)
    end

    it "return 'name' parameter" do
      expect(zc.roles_get(args)['name']).not_to be_nil
    end

    it "return 'description' parameter" do
      expect(zc.roles_get(args)['description']).not_to be_nil
    end

    it "return 'total_members' parameter" do
      expect(zc.roles_get(args)['total_members']).to eq(2)
    end

    it "returns 'privileges' Array" do
      expect(zc.roles_get(args)['privileges']).to be_kind_of(Array)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
zoom_rb-1.1.11 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.1.10 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.1.9 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.1.8 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.1.7 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.1.6 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.1.5 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.1.4 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.1.3 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.1.2 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.1.1 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.1.0 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.0.2 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.0.1 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-1.0.0 spec/lib/zoom/actions/roles/get_spec.rb
zoom_rb-0.11.0 spec/lib/zoom/actions/roles/get_spec.rb