Sha256: b273eb729b41cea4e911213c4fdcb2794005d6a2c9fe014895047fec651e6737

Contents?: true

Size: 647 Bytes

Versions: 136

Compression:

Stored size: 647 Bytes

Contents

# encoding: utf-8
require "spec_helper"
require "logstash/api/errors"

describe LogStash::Api::ApiError do
  subject { described_class.new }

  it "#status_code returns 500" do
    expect(subject.status_code).to eq(500)
  end

  it "#to_hash return the message of the exception" do
    expect(subject.to_hash).to include(:message => "Api Error")
  end
end

describe LogStash::Api::NotFoundError do
  subject { described_class.new }

  it "#status_code returns 404" do
    expect(subject.status_code).to eq(404)
  end

  it "#to_hash return the message of the exception" do
    expect(subject.to_hash).to include(:message => "Not Found")
  end
end

Version data entries

136 entries across 136 versions & 6 rubygems

Version Path
logstash-core-6.8.23-java spec/logstash/api/errors_spec.rb
logstash-core-6.8.22-java spec/logstash/api/errors_spec.rb
logstash-core-6.8.21-java spec/logstash/api/errors_spec.rb
logstash-core-6.8.20-java spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb
logstash-core-6.8.19-java spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb
logstash-core-6.8.18-java spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb
logstash-core-6.8.17-java spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/spec/logstash/api/errors_spec.rb