Sha256: 08c29741a379e47f6768c8aceb8b7370cd14f292edaee2137f89664130f979f3

Contents?: true

Size: 1.43 KB

Versions: 19

Compression:

Stored size: 1.43 KB

Contents

Shindo.tests("Fog::Compute[:brightbox] | collaboration requests", ["brightbox"]) do
  tests("success") do
    @test_collaborator_email = ENV["FOG_TEST_COLLABORATOR_EMAIL"]
    pending unless @test_collaborator_email

    tests("#create_collaboration") do
      pending if Fog.mocking?
      collaboration = Fog::Compute[:brightbox].create_collaboration(:email => @test_collaborator_email, :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

19 entries across 19 versions & 1 rubygems

Version Path
fog-brightbox-1.10.0 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.9.1 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.9.0 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.8.2 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.8.1 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.8.0 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.7.3 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.7.2 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.7.1 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.7.0 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.6.0 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.5.0 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.5.0.rc1 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.4.2 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.4.1 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.4.0 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.3.0 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.2.0 tests/brightbox/requests/compute/collaboration_tests.rb
fog-brightbox-1.1.0 tests/brightbox/requests/compute/collaboration_tests.rb