Sha256: b117bbd6bb10c91e430fd72f54ae1e498762f57a4b7723eaf4d10e638c2de157

Contents?: true

Size: 1.53 KB

Versions: 16

Compression:

Stored size: 1.53 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Zoom::Actions::Recording do
  let(:zc) { zoom_client }
  let(:args) { { user_id: 'kEFomHcIRgqxZT8D086O6A', meeting_id: 933560800 } }

  describe '#meeting_recording_get action' do
    before :each do
      stub_request(
        :get,
        zoom_url("/meetings/#{args[:meeting_id]}/recordings")
      ).to_return(
        status: 200,
        body: json_response('recording', 'get'),
        headers: { 'Content-Type' => 'application/json' }
      )
    end

    it "requires a 'meeting_id' argument" do
      expect {
        zc.meeting_recording_get(filter_key(args, :meeting_id))
      }.to raise_error(Zoom::ParameterMissing)
    end

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

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

      expect(res['uuid']).to eq("ucc69C82Q5mTNyCRWE29Aw==")
      expect(res['id']).to eq(args[:meeting_id])
      expect(res['host_id']).to eq('kEFomHcIRgqxZT8D086O6A')
      expect(res['account_id']).to eq('NyEqCEoYSNOr4jLMHoO2tA')
      expect(res['topic']).to eq('Meeting Topic Name')
      expect(res['start_time']).to eq('2015-04-13T01:06:04Z')
      expect(res['timezone']).to eq('UTC')
      expect(res['duration']).to eq(1)
      expect(res['total_size']).to eq(686496)
      expect(res['recording_count']).to eq(3)
    end

    it "returns 'recording_files' Array" do
      expect(zc.meeting_recording_get(args)['recording_files']).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/recording/get_spec.rb
zoom_rb-1.1.10 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.1.9 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.1.8 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.1.7 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.1.6 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.1.5 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.1.4 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.1.3 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.1.2 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.1.1 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.1.0 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.0.2 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.0.1 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-1.0.0 spec/lib/zoom/actions/recording/get_spec.rb
zoom_rb-0.11.0 spec/lib/zoom/actions/recording/get_spec.rb