Sha256: 28b68eb26267d2a402e9fc3b8797554eb3b0bbbf01c271579d47ac40514ca2ff

Contents?: true

Size: 754 Bytes

Versions: 1

Compression:

Stored size: 754 Bytes

Contents

# encoding: utf-8
require_relative "../../../support/shared_examples"
require_relative "../../spec_helper"
require "sinatra"
require "logstash/api/modules/plugins"
require "logstash/json"

describe LogStash::Api::Modules::Plugins do
  include_context "api setup"
  include_examples "not found"

  extend ResourceDSLMethods

  before(:each) do
    get "/"
  end

  let(:payload) { LogStash::Json.load(last_response.body) }

  describe "retrieving plugins" do
    it "should return OK" do
      expect(last_response).to be_ok
    end

    it "should return a list of plugins" do
      expect(payload["plugins"]).to be_a(Array)
    end

    it "should return the total number of plugins" do
      expect(payload["total"]).to be_a(Numeric)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
logstash-core-6.0.0.alpha1-java spec/api/lib/api/node_plugins_spec.rb