Sha256: e6bccc7e3874e9cfbe65c0b93a487021b196c957078614ecb5f3fc25669c767d

Contents?: true

Size: 570 Bytes

Versions: 3

Compression:

Stored size: 570 Bytes

Contents

# Encoding: utf-8

require 'spec_helper'

describe 'Etcd basic auth client' do

  let(:client) do
    Etcd.client(user_name: 'test', password: 'pwd')
  end

  it '#user_name' do
    expect(client.user_name).to eq('test')
  end

  it '#password' do
    expect(client.password).to eq('pwd')
  end

  it 'should set basic auth' do
    Net::HTTPRequest.any_instance.should_receive(:basic_auth).with('test', 'pwd')
    key = random_key
    value = uuid.generate
    client.set(key, value: value)
    sleep 1
    expect(read_only_client.get(key).value).to eq(value)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
etcd-0.2.2 spec/etcd/basic_auth_client_spec.rb
etcd-0.2.1 spec/etcd/basic_auth_client_spec.rb
etcd-0.2.0.beta.1 spec/etcd/basic_auth_client_spec.rb