Sha256: 09fe8c50c69502bbc0ecb260f6bd077a42210d309f188399213e8916628f0f9b

Contents?: true

Size: 679 Bytes

Versions: 6

Compression:

Stored size: 679 Bytes

Contents

require "logstash/devutils/rspec/spec_helper"
require "logstash/inputs/websocket"

describe LogStash::Inputs::Websocket do

  context "when url option isn't set" do
    subject { LogStash::Inputs::Websocket.new() }

    it "should raise exception" do
      expect { subject.register }.to raise_error(LogStash::ConfigurationError)
    end
  end

  context "when attempting to enable server mode" do
    subject {
      LogStash::Inputs::Websocket.new("url" => "http://example.com",
                                      "mode" => "server")
    }

    it "should raise exception" do
      expect { subject.register }.to raise_error(LogStash::ConfigurationError)
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
logstash-input-websocket-4.0.4 spec/inputs/websocket_spec.rb
logstash-input-websocket-4.0.3 spec/inputs/websocket_spec.rb
logstash-input-websocket-4.0.2 spec/inputs/websocket_spec.rb
logstash-input-websocket-4.0.1 spec/inputs/websocket_spec.rb
logstash-input-websocket-4.0.0 spec/inputs/websocket_spec.rb
logstash-input-websocket-3.0.2 spec/inputs/websocket_spec.rb