Sha256: 9ce46ac2afd9ae6d41446f33681a19b8295e63be69e367d597509ccb650de89e

Contents?: true

Size: 870 Bytes

Versions: 55

Compression:

Stored size: 870 Bytes

Contents

require 'spec_helper'

describe "Search API operations", type: "acceptance" do
  let(:server_url)  { Ridley::RSpec::ChefServer.server_url }
  let(:client_name) { "reset" }
  let(:client_key)  { fixtures_path.join('reset.pem').to_s }
  let(:connection)  { Ridley.new(server_url: server_url, client_name: client_name, client_key: client_key) }

  describe "listing indexes" do
    it "returns an array of indexes" do
      indexes = connection.search_indexes

      indexes.should include("role")
      indexes.should include("node")
      indexes.should include("client")
      indexes.should include("environment")
    end
  end

  describe "searching an index that doesn't exist" do
    it "it raises a Ridley::Errors::HTTPNotFound error" do
      lambda {
        connection.search(:notthere)
      }.should raise_error(Ridley::Errors::HTTPNotFound)
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
ridley-1.7.0 spec/acceptance/search_resource_spec.rb
ridley-1.6.0 spec/acceptance/search_resource_spec.rb
ridley-1.5.3 spec/acceptance/search_resource_spec.rb
ridley-1.2.6 spec/acceptance/search_resource_spec.rb
ridley-1.5.2 spec/acceptance/search_resource_spec.rb
ridley-1.5.1 spec/acceptance/search_resource_spec.rb
ridley-1.5.0 spec/acceptance/search_resource_spec.rb
ridley-1.2.5 spec/acceptance/search_resource_spec.rb
ridley-1.4.1 spec/acceptance/search_resource_spec.rb
ridley-1.4.0 spec/acceptance/search_resource_spec.rb
ridley-1.3.2 spec/acceptance/search_resource_spec.rb
ridley-1.3.1 spec/acceptance/search_resource_spec.rb
ridley-1.3.0 spec/acceptance/search_resource_spec.rb
ridley-1.0.3 spec/acceptance/search_resource_spec.rb
ridley-1.2.4 spec/acceptance/search_resource_spec.rb
ridley-1.2.3 spec/acceptance/search_resource_spec.rb
ridley-1.2.2 spec/acceptance/search_resource_spec.rb
ridley-1.2.1 spec/acceptance/search_resource_spec.rb
ridley-1.2.0 spec/acceptance/search_resource_spec.rb
ridley-1.1.1 spec/acceptance/search_resource_spec.rb