Sha256: 63a2c5a313fd3271029a7efe4b1200140a986e3943f3de6da97de4f92b196aac

Contents?: true

Size: 1.13 KB

Versions: 18

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'

describe "Sandbox API operations", type: "acceptance" do
  let(:server_url) { "https://api.opscode.com/organizations/ridley" }
  let(:client_name) { "reset" }
  let(:client_key) { "/Users/reset/.chef/reset.pem" }

  let(:connection) do
    Ridley.new(
      server_url: server_url,
      client_name: client_name,
      client_key: client_key
    )
  end

  before(:all) { WebMock.allow_net_connect! }
  after(:all) { WebMock.disable_net_connect! }

  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::SandboxResource" do
      connection.sandbox.create(checksums).should be_a(Ridley::SandboxResource)
    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

18 entries across 18 versions & 1 rubygems

Version Path
ridley-0.10.2 spec/acceptance/sandbox_resource_spec.rb
ridley-0.9.1 spec/acceptance/sandbox_resource_spec.rb
ridley-0.10.1 spec/acceptance/sandbox_resource_spec.rb
ridley-0.10.0 spec/acceptance/sandbox_resource_spec.rb
ridley-0.10.0.rc3 spec/acceptance/sandbox_resource_spec.rb
ridley-0.10.0.rc2 spec/acceptance/sandbox_resource_spec.rb
ridley-0.10.0.rc1 spec/acceptance/sandbox_resource_spec.rb
ridley-0.9.0 spec/acceptance/sandbox_resource_spec.rb
ridley-0.8.6 spec/acceptance/sandbox_resource_spec.rb
ridley-0.8.5 spec/acceptance/sandbox_resource_spec.rb
ridley-0.8.3 spec/acceptance/sandbox_resource_spec.rb
ridley-0.8.2 spec/acceptance/sandbox_resource_spec.rb
ridley-0.8.1 spec/acceptance/sandbox_resource_spec.rb
ridley-0.8.0 spec/acceptance/sandbox_resource_spec.rb
ridley-0.7.0 spec/acceptance/sandbox_resource_spec.rb
ridley-0.7.0.rc4 spec/acceptance/sandbox_resource_spec.rb
ridley-0.7.0.rc3 spec/acceptance/sandbox_resource_spec.rb
ridley-0.7.0.rc1 spec/acceptance/sandbox_resource_spec.rb