Sha256: 12f13cf606d13da8ffa844e2f628e29c7eed765a7aeb33d6ae8c018ec9a1401b

Contents?: true

Size: 1.32 KB

Versions: 1

Compression:

Stored size: 1.32 KB

Contents

Shindo.tests("Fog::Compute[:brightbox] | collaboration requests", ["brightbox"]) do
  tests("success") do
    tests("#create_collaboration") do
      pending if Fog.mocking?
      collaboration = Fog::Compute[:brightbox].create_collaboration(:email => "paul@example.com", :role => "admin")
      @collaboration_id = collaboration["id"]
      formats(Brightbox::Compute::Formats::Full::COLLABORATION, false) { collaboration }
    end

    tests("#list_collaborations") do
      pending if Fog.mocking?
      result = Fog::Compute[:brightbox].list_collaborations

      formats(Brightbox::Compute::Formats::Collection::COLLABORATIONS, false) { result }
    end

    tests("#get_collaboration") do
      pending if Fog.mocking?
      result = Fog::Compute[:brightbox].get_collaboration(@collaboration_id)
      formats(Brightbox::Compute::Formats::Full::COLLABORATION, false) { result }
    end

    tests("#delete_collaboration") do
      pending if Fog.mocking?
      result = Fog::Compute[:brightbox].delete_collaboration(@collaboration_id)
      formats(Brightbox::Compute::Formats::Full::COLLABORATION, false) { result }
    end
  end

  tests("failure") do
    tests("get_collaboration('col-abcde')").raises(Excon::Errors::NotFound) do
      pending if Fog.mocking?
      Fog::Compute[:brightbox].get_collaboration("col-abcde")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-brightbox-1.0.0 tests/brightbox/requests/compute/collaboration_tests.rb