Sha256: 69a0be3c036c4f5f5a1e61d477a584d5165c0a2d1e01f2992ac0d87826b92d66

Contents?: true

Size: 659 Bytes

Versions: 34

Compression:

Stored size: 659 Bytes

Contents

# encoding: utf-8
require_relative "../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

34 entries across 33 versions & 9 rubygems

Version Path
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.2.1-java/spec/api/lib/errors_spec.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.2.1-java/spec/api/lib/errors_spec.rb
mrcooper-logstash-output-azuresearch-0.2.2 vendor/jruby/2.5.0/gems/logstash-core-5.0.0-java/spec/api/lib/errors_spec.rb
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/logstash-core-5.2.1-java/spec/api/lib/errors_spec.rb
logstash-output-icinga-1.1.0 vendor/jruby/2.3.0/gems/logstash-core-5.2.1-java/spec/api/lib/errors_spec.rb
logstash-filter-cache-redis-0.1.0 vendor/bundle/jruby/1.9/gems/logstash-core-5.4.0-java/spec/api/lib/errors_spec.rb
logstash-core-5.4.3-java spec/api/lib/errors_spec.rb
logstash-core-5.4.2-java spec/api/lib/errors_spec.rb
logstash-filter-csharp-0.1.0 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.2.1-java/spec/api/lib/errors_spec.rb
logstash-core-5.4.1-java spec/api/lib/errors_spec.rb
logstash-core-5.3.3-java spec/api/lib/errors_spec.rb
logstash-filter-htmlentities-0.1.0 vendor/bundle/jruby/1.9/gems/logstash-core-5.4.0-java/spec/api/lib/errors_spec.rb
logstash-output-icinga-1.0.0 vendor/jruby/1.9/gems/logstash-core-5.2.1-java/spec/api/lib/errors_spec.rb
logstash-core-6.0.0.alpha1-java spec/api/lib/errors_spec.rb
logstash-core-5.4.0-java spec/api/lib/errors_spec.rb
logstash-core-5.3.2-java spec/api/lib/errors_spec.rb
logstash-core-5.3.1-java spec/api/lib/errors_spec.rb
logstash-core-5.3.0-java spec/api/lib/errors_spec.rb
logstash-core-5.2.2-java spec/api/lib/errors_spec.rb
logstash-input-fifo-0.9.1 vendor/bundle/jruby/1.9/gems/logstash-core-5.1.1.1-java/spec/api/lib/errors_spec.rb