Sha256: bb6036d94576e09977304369493fc0eb34930b60e847c6ff530f8f06a263176a

Contents?: true

Size: 1.4 KB

Versions: 11

Compression:

Stored size: 1.4 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

xdescribe Zoom::Actions::Meeting do
  let(:zc) { zoom_client }
  let(:args) { { host_id: 'ufR93M2pRyy8ePFN92dttq', id: '252482092', type: '2' } }

  xdescribe '#meeting_update action' do
    before :each do
      stub_request(
        :post,
        zoom_url('/meeting/update')
      ).to_return(body: json_response('meeting', 'update'))
    end

    it "requires a 'host_id' argument" do
      expect { zc.meeting_update(filter_key(args, :host_id)) }.to raise_error(ArgumentError)
    end

    it "requires a 'id' argument" do
      expect { zc.meeting_update(filter_key(args, :id)) }.to raise_error(ArgumentError)
    end

    it "requires a 'type' argument" do
      expect { zc.meeting_update(filter_key(args, :type)) }.to raise_error(ArgumentError)
    end

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

    it 'returns id and updated_at attributes' do
      res = zc.meeting_update(args)

      expect(res['id']).to eq(args[:id])
      expect(res['updated_at']).to eq('2013-02-25T15:52:38Z')
    end
  end

  xdescribe '#meeting_update! action' do
    before :each do
      stub_request(
        :post,
        zoom_url('/meeting/update')
      ).to_return(body: json_response('error'))
    end

    it 'raises Zoom::Error exception' do
      expect { zc.meeting_update!(args) }.to raise_error(Zoom::Error)
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
zoom_markazuna-0.10.0 spec/lib/zoom/actions/meeting/update_spec.rb
zoom_rb-0.10.0 spec/lib/zoom/actions/meeting/update_spec.rb
zoom_rb-0.9.1 spec/lib/zoom/actions/meeting/update_spec.rb
zoom_rb-0.9.0 spec/lib/zoom/actions/meeting/update_spec.rb
zoom_rb-0.8.7 spec/lib/zoom/actions/meeting/update_spec.rb
zoom_rb-0.8.6 spec/lib/zoom/actions/meeting/update_spec.rb
zoom_rb-0.8.5 spec/lib/zoom/actions/meeting/update_spec.rb
zoom_rb-0.8.4 spec/lib/zoom/actions/meeting/update_spec.rb
zoom_rb-0.8.3 spec/lib/zoom/actions/meeting/update_spec.rb
zoom_rb-0.8.2 spec/lib/zoom/actions/meeting/update_spec.rb
zoom_rb-0.8.1 spec/lib/zoom/actions/meeting/update_spec.rb