Sha256: 41f9f4c1812c91bca5e0f93a1e5d4f9b0fa80964d594aed50edde8b7fd334628

Contents?: true

Size: 1019 Bytes

Versions: 15

Compression:

Stored size: 1019 Bytes

Contents

require 'spec_helper'

describe "Sandbox 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) }

  let(:checksums) do
    [
      Ridley::SandboxUploader.checksum(fixtures_path.join("recipe_one.rb")),
      Ridley::SandboxUploader.checksum(fixtures_path.join("recipe_two.rb"))
    ]
  end

  describe "creating a new sandbox" do
    it "returns an instance of Ridley::SandboxObject" do
      connection.sandbox.create(checksums).should be_a(Ridley::SandboxObject)
    end

    it "contains a value for sandbox_id" do
      connection.sandbox.create(checksums).sandbox_id.should_not be_nil
    end

    it "returns an instance with the same amount of checksums given to create" do
      connection.sandbox.create(checksums).checksums.should have(2).items
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ridley-1.0.3 spec/acceptance/sandbox_resource_spec.rb
ridley-1.0.2 spec/acceptance/sandbox_resource_spec.rb
ridley-1.0.1 spec/acceptance/sandbox_resource_spec.rb
ridley-1.0.0 spec/acceptance/sandbox_resource_spec.rb
ridley-1.0.0.rc3 spec/acceptance/sandbox_resource_spec.rb
ridley-1.0.0.rc2 spec/acceptance/sandbox_resource_spec.rb
ridley-1.0.0.rc1 spec/acceptance/sandbox_resource_spec.rb
ridley-0.12.4 spec/acceptance/sandbox_resource_spec.rb
ridley-0.12.3 spec/acceptance/sandbox_resource_spec.rb
ridley-0.12.2 spec/acceptance/sandbox_resource_spec.rb
ridley-0.12.1 spec/acceptance/sandbox_resource_spec.rb
ridley-0.12.0 spec/acceptance/sandbox_resource_spec.rb
ridley-0.11.2 spec/acceptance/sandbox_resource_spec.rb
ridley-0.12.0.rc1 spec/acceptance/sandbox_resource_spec.rb
ridley-0.11.1 spec/acceptance/sandbox_resource_spec.rb