Sha256: 866b489bff5c6673181b63ab62abc388231dcb03d896f930d6f8211fb626104d

Contents?: true

Size: 1.1 KB

Versions: 34

Compression:

Stored size: 1.1 KB

Contents

Shindo.tests('Fog::Rackspace::Queues | queue_tests', ['rackspace']) do

  pending if Fog.mocking?

  service = Fog::Rackspace::Queues.new

  tests('success') do

    queue_name = 'fog' + Time.now.to_i.to_s

    tests("#create_queue(#{queue_name})").succeeds do
      service.create_queue(queue_name)
    end

    tests("#list_queues").formats(LIST_QUEUES_FORMAT) do
      response = service.list_queues
      response.body
    end

    tests("#get_queue(#{queue_name})").formats(QUEUE_FORMAT) do
      service.get_queue(queue_name).body
    end

    tests("#get_queue_stats(#{queue_name})").formats(QUEUE_STATS_FORMAT) do
      service.get_queue_stats(queue_name).body
    end

    tests("#delete_queue(#{queue_name})").succeeds do
      service.delete_queue(queue_name)
    end
  end

  tests('failure') do
    tests("#create_queue('') => Invalid Create Critera").raises(Fog::Rackspace::Queues::MethodNotAllowed) do
      service.create_queue('')
    end

    tests("#get_queue('nonexistentqueue') => Does not exist").raises(Fog::Rackspace::Queues::NotFound) do
      service.get_queue('nonexistentqueue')
    end

  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
fog-maestrodev-1.19.0.20140212012611 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/rackspace/requests/queues/queues_tests.rb
fog-1.19.0 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.18.0.20131209090811 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.18.0.20131206115947 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.18.0.20131205181604 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.18.0.20131127194823 tests/rackspace/requests/queues/queues_tests.rb
fog-maestrodev-1.18.0.20131126183714 tests/rackspace/requests/queues/queues_tests.rb