Sha256: d8373f806db40a8a4a5233b73bbe677c45ff8404a1f9a1efd915cfdd91df3478

Contents?: true

Size: 669 Bytes

Versions: 15

Compression:

Stored size: 669 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'
require 'drillbit/errors/invalid_subdomain'

module    Drillbit
module    Errors
describe  InvalidSubdomain do
  let(:error) { InvalidSubdomain.new }

  it 'has a status of 404' do
    expect(error.http_status).to eql 404
  end

  it 'has a code' do
    expect(error.code).to eql 'errors.invalid_subdomain'
  end

  it 'can output the detail' do
    expect(error.detail).to eql \
      'The subdomain you attempted to access is not valid.  Please try again.'
  end

  it 'can output the source' do
    error = InvalidSubdomain.new http_host: 'foo'

    expect(error.source).to eql(http_host: 'foo')
  end
end
end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
drillbit-2.9.1 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.9.0 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.8.0 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.7.0 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.6.0 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.5.0 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.4.0 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.3.1 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.3.0 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.2.2 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.2.1 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.2.0 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.1.0 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.0.1 spec/drillbit/errors/invalid_subdomain_spec.rb
drillbit-2.0.0 spec/drillbit/errors/invalid_subdomain_spec.rb