Sha256: 4cef19bbe54f0f6adae779667aa1af8ed7f2bbb4fa7d9c39c6684a75b5b29712

Contents?: true

Size: 1.02 KB

Versions: 40

Compression:

Stored size: 1.02 KB

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(File.open(fixtures_path.join("recipe_one.rb"))),
      Ridley::SandboxUploader.checksum(File.open(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

40 entries across 40 versions & 1 rubygems

Version Path
ridley-4.2.0 spec/acceptance/sandbox_resource_spec.rb
ridley-4.1.2 spec/acceptance/sandbox_resource_spec.rb
ridley-4.1.1 spec/acceptance/sandbox_resource_spec.rb
ridley-4.1.0 spec/acceptance/sandbox_resource_spec.rb
ridley-4.0.0 spec/acceptance/sandbox_resource_spec.rb
ridley-3.1.0 spec/acceptance/sandbox_resource_spec.rb
ridley-3.0.0 spec/acceptance/sandbox_resource_spec.rb
ridley-3.0.0.rc1 spec/acceptance/sandbox_resource_spec.rb
ridley-2.5.1 spec/acceptance/sandbox_resource_spec.rb
ridley-2.5.0 spec/acceptance/sandbox_resource_spec.rb
ridley-2.4.4 spec/acceptance/sandbox_resource_spec.rb
ridley-2.4.3 spec/acceptance/sandbox_resource_spec.rb
ridley-2.4.2 spec/acceptance/sandbox_resource_spec.rb
ridley-2.4.1 spec/acceptance/sandbox_resource_spec.rb
ridley-2.4.0 spec/acceptance/sandbox_resource_spec.rb
ridley-2.3.0 spec/acceptance/sandbox_resource_spec.rb
ridley-2.2.0 spec/acceptance/sandbox_resource_spec.rb
ridley-2.1.0 spec/acceptance/sandbox_resource_spec.rb
ridley-2.0.0 spec/acceptance/sandbox_resource_spec.rb
ridley-1.7.1 spec/acceptance/sandbox_resource_spec.rb