Sha256: 93aff7dbb2d85f56a40714592019c6cdf7e32198ce9b2f3030dbb595327c8369

Contents?: true

Size: 595 Bytes

Versions: 19

Compression:

Stored size: 595 Bytes

Contents

require 'spec_helper'
require 'active_support/i18n'
require 'doorkeeper/oauth/error'

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: [:doorkeeper, :errors, :messages],
          default: :server_error
        )
        error.description
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
doorkeeper-4.3.0 spec/lib/oauth/error_spec.rb
doorkeeper-sequel-1.4.0 spec/lib/oauth/error_spec.rb
doorkeeper-mongodb-4.0.1 spec/lib/oauth/error_spec.rb
doorkeeper-mongodb-4.0.0 spec/lib/oauth/error_spec.rb
doorkeeper-sequel-1.3.1 spec/lib/oauth/error_spec.rb
doorkeeper-sequel-1.3.0 spec/lib/oauth/error_spec.rb
doorkeeper-sequel-1.2.3 spec/lib/oauth/error_spec.rb
doorkeeper-sequel-1.2.2 spec/lib/oauth/error_spec.rb
doorkeeper-4.2.6 spec/lib/oauth/error_spec.rb
doorkeeper-4.2.5 spec/lib/oauth/error_spec.rb
doorkeeper-sequel-1.2.1 spec/lib/oauth/error_spec.rb
doorkeeper-4.2.0 spec/lib/oauth/error_spec.rb
doorkeeper-4.1.0 spec/lib/oauth/error_spec.rb
doorkeeper-4.0.0 spec/lib/oauth/error_spec.rb
doorkeeper-4.0.0.rc4 spec/lib/oauth/error_spec.rb
doorkeeper-4.0.0.rc3 spec/lib/oauth/error_spec.rb
doorkeeper-4.0.0.rc2 spec/lib/oauth/error_spec.rb
doorkeeper-4.0.0.rc1 spec/lib/oauth/error_spec.rb
doorkeeper-3.1.0 spec/lib/oauth/error_spec.rb