Permalink
Browse files

Tests for ensuring create queue works properly.

  • Loading branch information...
1 parent 4e0c036 commit 859a20a54acc1c5a9a6f1300f29146b32e4fbef5 @treeder treeder committed Mar 1, 2013
Showing with 19 additions and 0 deletions.
  1. +5 −0 lib/iron_mq/queues.rb
  2. +12 −0 test/test_iron_mq.rb
  3. +2 −0 test/test_push_queues.rb
View
@@ -145,6 +145,11 @@ def total_messages
return raw["total_messages"]
end
+ def push_type
+ load_queue()
+ return raw["push_type"]
+ end
+
def subscribers
load_queue()
return raw["subscribers"]
View
@@ -106,6 +106,18 @@ def test_basics
end
+ def test_queue_create
+ q = @client.queue('normal_pull_queue')
+ q.update_queue() # creates if it doesn't exist
+ q.reload
+ assert_not_nil q.id
+ assert_nil q.push_type
+ assert_nil q.subscribers
+
+ q.delete_queue
+
+ end
+
def test_queues_list
queue_name = 'test_queues_list'
View
@@ -39,6 +39,7 @@ def test_queue_subscriptions
queue = @client.queue(qname)
LOG.debug queue
LOG.debug queue.subscribers
+ assert_equal t, queue.push_type
assert_equal num_subscribers, queue.subscribers.size
# add the last one
@@ -330,4 +331,5 @@ def test_202_failure
omit_if @skip
end
+
end

0 comments on commit 859a20a

Please sign in to comment.