Sha256: b05f5c1c2b6a45bc58c390acb5171fb2ecb1bf8a66f3492ec53e3e920e065443

Contents?: true

Size: 605 Bytes

Versions: 1

Compression:

Stored size: 605 Bytes

Contents

require 'minitest_helper'

describe SimpleSolrClient::Client do

  before do
    @client = TestClient.instance.client
  end
  it "creates a new object" do
    @client.base_url.must_equal ENV['TEST_SOLR_URL']
  end

  it "strips off a trailing slash for base_url" do
    c = SimpleSolrClient::Client.new( ENV['TEST_SOLR_URL'])
    c.base_url.must_equal ENV['TEST_SOLR_URL']
  end

  it "constructs a url with no args" do
    @client.url.must_equal ENV['TEST_SOLR_URL']
  end

  it "constructs a URL with args" do
    @client.url('admin', 'ping').must_equal "#{ENV['TEST_SOLR_URL']}/admin/ping"
  end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simple_solr_client-0.2.1 spec/client_basics_spec.rb