Sha256: ac5e98842c93e432ca8b44d34a472cd243a8477cd7f183a39715bd3fc389c108

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

require "spec_helper"
describe Auth0::Client do
  context "modules to be included" do
    let(:subject){Auth0::Client.new({})}
    before :each do
      allow_any_instance_of(Auth0::Client).to receive(:obtain_access_token)
    end
    it {expect(subject).to be_a HTTParty}
    it {expect(subject).to be_a Auth0::Mixins}
    it {expect(subject).to be_a Auth0::Mixins::Initializer}
    it {expect(subject).to be_a Auth0::Api::V1}
    it {expect(subject).to be_a Auth0::Api::V1::Users}
    it {expect(subject).to be_a Auth0::Api::V1::Connections}
    it {expect(subject).to be_a Auth0::Api::V1::Clients}
    it {expect(subject).to be_a Auth0::Api::V1::Rules}
    it {expect(subject).to be_a Auth0::Api::V1::Logs}
    it {expect(subject).to be_a Auth0::Api::AuthenticationEndpoints}
    context "JwtOperations should be included optionally" do
      it {expect(subject).not_to be_a Auth0::Mixins::JwtOperations}
      it "should include JwtOperations if jwt flag is set" do
        client = Auth0::Client.new(jwt: true)
        expect(client).to be_a Auth0::Mixins::JwtOperations
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
auth0-ruby-0.9.1 spec/lib/auth0/client_spec.rb