Sha256: 1a808a86963f9f63313ebdd38fffedf3cab7233a795666b282ca74f8b76c4ffe

Contents?: true

Size: 529 Bytes

Versions: 10

Compression:

Stored size: 529 Bytes

Contents

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

10 entries across 10 versions & 3 rubygems

Version Path
doorkeeper-5.0.3 spec/lib/oauth/error_spec.rb
doorkeeper-5.1.0.rc2 spec/lib/oauth/error_spec.rb
doorkeeper-5.1.0.rc1 spec/lib/oauth/error_spec.rb
doorkeeper-5.0.2 spec/lib/oauth/error_spec.rb
doorkeeper-mongodb-5.0.0 spec/lib/oauth/error_spec.rb
doorkeeper-5.0.1 spec/lib/oauth/error_spec.rb
doorkeeper-sequel-2.0.0 spec/lib/oauth/error_spec.rb
doorkeeper-5.0.0 spec/lib/oauth/error_spec.rb
doorkeeper-5.0.0.rc2 spec/lib/oauth/error_spec.rb
doorkeeper-5.0.0.rc1 spec/lib/oauth/error_spec.rb