Sha256: bf0bd8c2ea1aa83c9091e8ea4c32ff79dc5149a10d57661f27c2b1f682440890

Contents?: true

Size: 560 Bytes

Versions: 15

Compression:

Stored size: 560 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

module Doorkeeper::OAuth
  describe Error do
    subject(:error) { Error.new(:some_error, :some_state) }

    it { expect(subject).to respond_to(:name) }
    it { expect(subject).to respond_to(:state) }

    describe :description do
      it "is translated from translation messages" do
        expect(I18n).to receive(:translate).with(
          :some_error,
          scope: %i[doorkeeper errors messages],
          default: :server_error
        )
        error.description
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
doorkeeper-5.1.2 spec/lib/oauth/error_spec.rb
doorkeeper-5.2.6 spec/lib/oauth/error_spec.rb
doorkeeper-5.1.1 spec/lib/oauth/error_spec.rb
doorkeeper-5.2.5 spec/lib/oauth/error_spec.rb
doorkeeper-sequel-2.2.0 spec/lib/oauth/error_spec.rb
doorkeeper-5.2.4 spec/lib/oauth/error_spec.rb
doorkeeper-5.2.3 spec/lib/oauth/error_spec.rb
doorkeeper-5.2.2 spec/lib/oauth/error_spec.rb
doorkeeper-sequel-2.1.0 spec/lib/oauth/error_spec.rb
doorkeeper-5.2.1 spec/lib/oauth/error_spec.rb
doorkeeper-5.2.0 spec/lib/oauth/error_spec.rb
doorkeeper-5.2.0.rc3 spec/lib/oauth/error_spec.rb
doorkeeper-5.2.0.rc2 spec/lib/oauth/error_spec.rb
doorkeeper-5.2.0.rc1 spec/lib/oauth/error_spec.rb
doorkeeper-5.1.0 spec/lib/oauth/error_spec.rb