Sha256: eb3b279afced61cd8f403f401a257721f52cc6ba8019094a08a5fcc56c944132

Contents?: true

Size: 1.24 KB

Versions: 4

Compression:

Stored size: 1.24 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Zoom::Actions::Token do
  let(:zc) { oauth_client }
  let(:args) do
    {
      client_id: "df22ff22ifjiedfsk",
      user_id: "ffww554884fwe21fe",
      account_id: "fwefkjKfjwe9e",
      deauthorization_event_received: {
        user_data_retention: false,
        account_id: "fwefkjKfjwe9e",
        user_id: "a8yBxjayaSiw02igC8p8l0",
        signature: "85f9dd5684aecfa97h7bc86b7edc345204467f2jfj4df1b290093cf73fd1e6b00",
        deauthorization_time: "2019-06-17T13:52:28.632Z",
        client_id: "df22ff22ifjiedfsk"
      },
      compliance_completed: true
    }
  end

  describe '#data_compliance action' do
    before :each do
      stub_request(
        :post,
        zoom_auth_url('oauth/data/compliance')
      ).to_return(body: json_response('token', 'data_compliance'),
                    headers: { 'Content-Type' => 'application/json' })
    end

    it "requires an error when args missing" do
      expect { zc.data_compliance }.to raise_error(Zoom::ParameterMissing, [:client_id, :user_id, :account_id, :deauthorization_event_received, :compliance_completed].to_s)
    end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
zoom_rb-1.0.2 spec/lib/zoom/actions/token/data_compliance_spec.rb
zoom_rb-1.0.1 spec/lib/zoom/actions/token/data_compliance_spec.rb
zoom_rb-1.0.0 spec/lib/zoom/actions/token/data_compliance_spec.rb
zoom_rb-0.11.0 spec/lib/zoom/actions/token/data_compliance_spec.rb