Sha256: c394b96d09e989e59ca589a1bf392d246e190c5a5beff867d89f48b945694d54

Contents?: true

Size: 1.19 KB

Versions: 11

Compression:

Stored size: 1.19 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

xdescribe Zoom::Actions::Recording do

  before :all do
    @zc = zoom_client
    @args = { meeting_id: 'ucc69C82Q5mTNyCRWE29Aw==' }
  end

  xdescribe '#recording_delete action' do
    before :each do
      stub_request(
        :post,
        zoom_url('/recording/delete')
      ).to_return(body: json_response('recording_delete'))
    end

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

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

    it 'returns id and deleted at attributes' do
      res = @zc.recording_delete(@args)

      expect(res['id']).to eq(@args[:meeting_id])
      expect(res['deleted_at']).to eq('2012-11-25T12:00:00Z')
    end
  end

  xdescribe '#recording_delete! action' do
    before :each do
      stub_request(
        :post,
        zoom_url('/recording/delete')
      ).to_return(body: json_response('error'))
    end

    it 'raises Zoom::Error exception' do
      expect {
        @zc.recording_delete!(@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/recording/delete_spec.rb
zoom_rb-0.10.0 spec/lib/zoom/actions/recording/delete_spec.rb
zoom_rb-0.9.1 spec/lib/zoom/actions/recording/delete_spec.rb
zoom_rb-0.9.0 spec/lib/zoom/actions/recording/delete_spec.rb
zoom_rb-0.8.7 spec/lib/zoom/actions/recording/delete_spec.rb
zoom_rb-0.8.6 spec/lib/zoom/actions/recording/delete_spec.rb
zoom_rb-0.8.5 spec/lib/zoom/actions/recording/delete_spec.rb
zoom_rb-0.8.4 spec/lib/zoom/actions/recording/delete_spec.rb
zoom_rb-0.8.3 spec/lib/zoom/actions/recording/delete_spec.rb
zoom_rb-0.8.2 spec/lib/zoom/actions/recording/delete_spec.rb
zoom_rb-0.8.1 spec/lib/zoom/actions/recording/delete_spec.rb