Sha256: 641223605f596eb86d1881f23a2a5a1070cc446e2ddce562cd250d1a6a0f3cd4

Contents?: true

Size: 545 Bytes

Versions: 1

Compression:

Stored size: 545 Bytes

Contents

require 'spec_helper'

describe Bling::API::Response do


  context 'with a valid http response' do
    let(:http_response) { Net::HTTPOK.new('1.1', '200', 'OK') }

    it 'is a success' do
      pending
      expect(described_class.new(http_response, 'foo').success?).to be_truthy
    end

  end

  context 'with a invalid http response' do
    let(:http_response) { Net::HTTPBadRequest.new('1.1', '400', 'Bad request') }

    it 'is a failure' do
      expect(described_class.new(http_response, 'foo').success?).to be_falsey
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bling-ruby-api-0.0.1 spec/lib/bling/api/response_spec.rb