Sha256: 3ae82d9e6be6f0c159090b7f60acb58731717a37ad6b66b1652c1959e5352397

Contents?: true

Size: 1.02 KB

Versions: 5

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'

describe "Client 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 "uploading a cookbook" do
    let(:path) { fixtures_path.join("example_cookbook") }

    it "uploads the entire contents of the cookbook in the given path" do
      connection.cookbook.upload(path)
      cookbook = connection.cookbook.find("example_cookbook", "0.1.0")

      cookbook.attributes.should have(1).item
      cookbook.definitions.should have(1).item
      cookbook.files.should have(2).items
      cookbook.libraries.should have(1).item
      cookbook.providers.should have(1).item
      cookbook.recipes.should have(1).item
      cookbook.resources.should have(1).item
      cookbook.templates.should have(1).item
      cookbook.root_files.should have(2).items
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ridley-0.12.1 spec/acceptance/cookbook_resource_spec.rb
ridley-0.12.0 spec/acceptance/cookbook_resource_spec.rb
ridley-0.11.2 spec/acceptance/cookbook_resource_spec.rb
ridley-0.12.0.rc1 spec/acceptance/cookbook_resource_spec.rb
ridley-0.11.1 spec/acceptance/cookbook_resource_spec.rb