Sha256: f9e497f5cef8a83cbda99a1019249e379a8d77ed92add6b91636762c2703b875

Contents?: true

Size: 592 Bytes

Versions: 9

Compression:

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

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
doorkeeper-mongodb-4.2.0 spec/lib/oauth/error_spec.rb
doorkeeper-sequel-1.5.0 spec/lib/oauth/error_spec.rb
doorkeeper-4.4.3 spec/lib/oauth/error_spec.rb
doorkeeper-4.4.2 spec/lib/oauth/error_spec.rb
doorkeeper-4.4.1 spec/lib/oauth/error_spec.rb
doorkeeper-4.4.0 spec/lib/oauth/error_spec.rb
doorkeeper-mongodb-4.1.0 spec/lib/oauth/error_spec.rb
doorkeeper-4.3.2 spec/lib/oauth/error_spec.rb
doorkeeper-4.3.1 spec/lib/oauth/error_spec.rb