Sha256: df7e0e1b5f5dec9635adc1d1f10147c175e44da3782b7089e4d773120dd5f8aa

Contents?: true

Size: 1.59 KB

Versions: 4

Compression:

Stored size: 1.59 KB

Contents

#-------------------------------------------------------------------------
# # Copyright (c) Microsoft and contributors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#--------------------------------------------------------------------------
require "integration/test_helper"
require "azure/queue/queue_service"

describe Azure::Queue::QueueService do
  subject { Azure::Queue::QueueService.new }

  describe '#list_queues' do
    let(:queue_names){ [QueueNameHelper.name, QueueNameHelper.name] }
    before { queue_names.each { |q| subject.create_queue q } }
    after { QueueNameHelper.clean }
    
    it 'lists the available queues' do
      expected_queues = 0

      # An empty next marker means to start at the beginning
      next_marker = ''
      begin
        result = subject.list_queues( { :marker => next_marker } )
        result.each { |q|
          q.name.wont_be_nil
          expected_queues += 1 if queue_names.include? q.name
        }

        next_marker = result.continuation_token
      end while next_marker != ''
      expected_queues.must_equal queue_names.length
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
azure-0.7.0 test/integration/queue/list_queues_test.rb
azure-0.7.0.pre3 test/integration/queue/list_queues_test.rb
azure-fix-0.7.0.pre3 test/integration/queue/list_queues_test.rb
azure-0.7.0.pre2 test/integration/queue/list_queues_test.rb