Sha256: efe217287b4dd3aed91b7f553d544d94e8508466c6990943ad18a7e431492af7

Contents?: true

Size: 490 Bytes

Versions: 7

Compression:

Stored size: 490 Bytes

Contents

require 'spec_helper'

describe NexaasID::Client::Exception do
  subject { described_class.new('foobar', response) }

  let(:headers) { { 'Content-Type' => 'application/json' } }
  let(:body) { { text: 'Coffee brewing failed' }.to_json }
  let(:response) do
    OAuth2::Response.new(double('response', status: 418, headers: headers, body: body))
  end

  it { expect(subject.status).to eq(418) }
  it { expect(subject.headers).to eq(headers) }
  it { expect(subject.body).to eq(body) }
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nexaas_id-client-0.7.4 spec/nexaas_id/client/exception_spec.rb
nexaas_id-client-0.7.3 spec/nexaas_id/client/exception_spec.rb
nexaas_id-client-0.7.2 spec/nexaas_id/client/exception_spec.rb
nexaas_id-client-0.7.1 spec/nexaas_id/client/exception_spec.rb
nexaas_id-client-0.7.0 spec/nexaas_id/client/exception_spec.rb
nexaas_id-client-0.6.0 spec/nexaas_id/client/exception_spec.rb
nexaas_id-client-0.5.0 spec/nexaas_id/client/exception_spec.rb