Sha256: a583f341a11905cadab9a0d5258a0f330ddbcf1475e96d69384cafccaba2728a

Contents?: true

Size: 1.12 KB

Versions: 5

Compression:

Stored size: 1.12 KB

Contents

require 'spec_helper'

describe NexaasID::Resources::SignUp do
  let(:resource) { client.sign_up }

  describe "#create" do
    describe 'with application client' do
      let(:client) { NexaasID::Client::Application.new(default_configuration) }
      subject { resource.create('demurtas@mailinator.com') }

      it 'invites an user' do
        VCR.use_cassette('application/sign_up/create/success') do
          expect(subject.id).not_to be_nil
          expect(subject.email).to eq('demurtas@mailinator.com')
          expect(subject.requester).to be_nil
        end
      end
    end

    describe 'with identity client' do
      let(:client) do
        configuration = default_configuration
        NexaasID::Client::Identity.new(user_credentials(configuration), configuration)
      end
      subject { resource.create('demurtas@mailinator.com') }

      it 'invites an user' do
        VCR.use_cassette('identity/sign_up/create/success') do
          expect(subject.id).not_to be_nil
          expect(subject.email).to eq('demurtas@mailinator.com')
          expect(subject.requester).not_to be_nil
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
nexaas_id-client-0.7.4 spec/nexaas_id/resources/sign_up_spec.rb
nexaas_id-client-0.7.3 spec/nexaas_id/resources/sign_up_spec.rb
nexaas_id-client-0.7.2 spec/nexaas_id/resources/sign_up_spec.rb
nexaas_id-client-0.7.1 spec/nexaas_id/resources/sign_up_spec.rb
nexaas_id-client-0.7.0 spec/nexaas_id/resources/sign_up_spec.rb