Sha256: 1c2d994adf491e0d219e0931295a34d7ea848da2c501cada521f1c19bb2ee12b

Contents?: true

Size: 1.01 KB

Versions: 2

Compression:

Stored size: 1.01 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 }
      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) { NexaasID::Client::Identity.new(user_credentials) }
      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

2 entries across 2 versions & 1 rubygems

Version Path
nexaas_id-client-0.6.0 spec/nexaas_id/resources/sign_up_spec.rb
nexaas_id-client-0.5.0 spec/nexaas_id/resources/sign_up_spec.rb