Sha256: a5d431eec2edbf860b36f5eb87dac07d1ea557371fd60ceb134d236879a6652d

Contents?: true

Size: 953 Bytes

Versions: 9

Compression:

Stored size: 953 Bytes

Contents

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

  pending if Fog.mocking?

  service = Fog::Rackspace::Queues.new
  queue = service.queues.create({
    :name => "fog_instance_#{Time.now.to_i.to_s}",
  })
  options = {
    :ttl => VALID_TTL,
    :body => { :key => 'value' }
  }
  begin
    model_tests(queue.messages, options, false) do
      tests('#href').returns(true) do
        !@instance.href.nil?
      end
      tests('#identity').returns(true) do
        !@instance.identity.nil?
      end
      tests('#save => Fails to update').raises(StandardError) do
        @instance.save
      end
    end

    message = queue.messages.create(options.merge({:claim_id => '10'}))
    tests('#destroy => fails if claim is not valid').raises(Fog::Rackspace::Queues::ServiceError) do
      #API team should be fixing this so that it errors in this scenario
      pending
      message.destroy
    end
  ensure
    queue.destroy
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
fog-maestrodev-1.18.0.20131121075022 tests/rackspace/models/queues/message_tests.rb
fog-maestrodev-1.18.0.20131118164830 tests/rackspace/models/queues/message_tests.rb
fog-maestrodev-1.18.0.20131115184302 tests/rackspace/models/queues/message_tests.rb
fog-maestrodev-1.18.0.20131114200144 tests/rackspace/models/queues/message_tests.rb
fog-maestrodev-1.18.0.20131112185232 tests/rackspace/models/queues/message_tests.rb
fog-maestrodev-1.18.0.20131111203459 tests/rackspace/models/queues/message_tests.rb
fog-1.18.0 tests/rackspace/models/queues/message_tests.rb
fog-1.17.0 tests/rackspace/models/queues/message_tests.rb
fog-1.16.0 tests/rackspace/models/queues/message_tests.rb