Sha256: d70ffe02b851552bc761efa225070d3ca0a61d8a43bc55cdfd9c8c827b644077

Contents?: true

Size: 469 Bytes

Versions: 2

Compression:

Stored size: 469 Bytes

Contents

describe Mrkt::Errors do
  describe '.find_by_response_code' do
    subject(:actual) { described_class.find_by_response_code(code) }

    context 'when the code is known' do
      let(:code) { 413 }

      it 'returns the mapped error class' do
        expect(actual).to eq(Mrkt::Errors::RequestEntityTooLarge)
      end
    end

    context 'when the code is unknown' do
      let(:code) { 7331 }

      it { is_expected.to eq(Mrkt::Errors::Error) }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mrkt-1.2.2 spec/errors_spec.rb
mrkt-1.2.1 spec/errors_spec.rb