Sha256: 6e2f27783c061172e2505b03d298935c42be83d8e7318cfa1ecad491974db317

Contents?: true

Size: 581 Bytes

Versions: 2

Compression:

Stored size: 581 Bytes

Contents

require 'spec_helper'

describe NexaasID::Resources::Widget do
  let(:client) { NexaasID::Client::Identity.new(user_credentials) }
  let(:resource) { client.widget }

  describe "#navbar_url" do
    subject { resource.navbar_url }
    let(:regexp) { %r(#{Regexp.quote(NexaasID.configuration.url)}/api/v1/widgets/navbar\?access_token=(.+?)$) }

    it 'returns the navbar url for this user' do
      VCR.use_cassette('identity/widget/navbar_url/success') do
        expect(subject).to match(regexp)
        expect(Faraday.get(subject).status).to eq(200)
      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/widget_spec.rb
nexaas_id-client-0.5.0 spec/nexaas_id/resources/widget_spec.rb