Sha256: b4a746df660f795f756df2108543216d443e0164721f1b9585c4978d510f008f
Contents?: true
Size: 989 Bytes
Versions: 43
Compression:
Stored size: 989 Bytes
Contents
require "logstash/outputs/elasticsearch" require "logstash/outputs/elasticsearch/http_client" require "logstash/outputs/elasticsearch/http_client_builder" describe LogStash::Outputs::ElasticSearch::HttpClientBuilder do describe "auth setup with url encodable passwords" do let(:klass) { LogStash::Outputs::ElasticSearch::HttpClientBuilder } let(:user) { "foo@bar"} let(:password) {"baz@blah" } let(:password_secured) do secured = double("password") allow(secured).to receive(:value).and_return(password) secured end let(:options) { {"user" => user, "password" => password} } let(:logger) { mock("logger") } let(:auth_setup) { klass.setup_basic_auth(double("logger"), {"user" => user, "password" => password_secured}) } it "should return the user verbatim" do expect(auth_setup[:user]).to eql(user) end it "should return the password verbatim" do expect(auth_setup[:password]).to eql(password) end end end
Version data entries
43 entries across 43 versions & 1 rubygems