Sha256: a04360ffcc239dac7b9a39cf2d85a0fb76dd5ab0e6486b2c21e772f359c157a5
Contents?: true
Size: 1.28 KB
Versions: 2
Compression:
Stored size: 1.28 KB
Contents
require 'spec_helper' describe Zoomus::Actions::Metrics do before :all do @zc = zoomus_client @args = { meeting_id: 't13b6hjVQXybvGKyeHC96w==', type: 1 } end describe "#metrics_meetingdetail action" do before :each do stub_request( :post, zoomus_url("/metrics/meetingdetail") ).to_return(:body => json_response("metrics_meetingdetail")) end it "requires a 'meeting_id' argument" do expect { @zc.metrics_meetingdetail(filter_key(@args, :meeting_id)) }.to raise_error(ArgumentError) end it "requires a 'type' argument" do expect { @zc.metrics_meetingdetail(filter_key(@args, :type)) }.to raise_error(ArgumentError) end it "returns a hash" do expect(@zc.metrics_meetingdetail(@args)).to be_kind_of(Hash) end it "returns 'participants' Array" do expect(@zc.metrics_meetingdetail(@args)["participants"]).to be_kind_of(Array) end end describe "#metrics_meetingdetail! action" do before :each do stub_request( :post, zoomus_url("/metrics/meetingdetail") ).to_return(:body => json_response("error")) end it "raises Zoomus::Error exception" do expect { @zc.metrics_meetingdetail!(@args) }.to raise_error(Zoomus::Error) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
zoomus-0.7.0 | spec/lib/zoomus/actions/metrics/meetingdetail_spec.rb |
zoomus-0.6.0 | spec/lib/zoomus/actions/metrics/meetingdetail_spec.rb |