Sha256: d63390d4b74a4afc5788de3cb2158b56041c79ca20c5dcd421bf22da47e8df43

Contents?: true

Size: 602 Bytes

Versions: 16

Compression:

Stored size: 602 Bytes

Contents

require 'spec_helper'

RSpec.describe RDStation::ErrorHandler::Unauthorized do
  describe '#raise_error' do

    subject(:unauthorized_error) { described_class.new(errors) }

    context 'when there is an unauthorized error' do
      let(:errors) do
        [
          {
            'error_message' => 'Error Message',
            'error_type' => 'UNAUTHORIZED'
          }
        ]
      end

      it 'raises an Unauthorized error' do
        expect do
          unauthorized_error.raise_error
        end.to raise_error(RDStation::Error::Unauthorized, 'Error Message')
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rdstation-ruby-client-2.9.0 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.8.2 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.8.1 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.8.0 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.7.0 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.6.0 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.5.3 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.5.2 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.5.1 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.5.0 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.4.0 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.3.1 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.3.0 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.2.0 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.1.0 spec/lib/rdstation/error_handler/unauthorized_spec.rb
rdstation-ruby-client-2.0.0 spec/lib/rdstation/error_handler/unauthorized_spec.rb