Permalink
Browse files

Added a test for the fix

  • Loading branch information...
1 parent 6fdbae5 commit 6cf998d0c174e2623f852e4aff99d13d7a35cd20 Mike Bardzinski committed Mar 20, 2012
Showing with 26 additions and 0 deletions.
  1. +26 −0 test/test-exchange-callbacks.js
@@ -0,0 +1,26 @@
+require('./harness');
+
+
+
+connection.addListener('ready', function () {
+ puts("connected to " + connection.serverProperties.product);
+
+ var nonAmqExchangeCalledback = false;
+ var amqExchangeCalledback = false;
+
+ connection.exchange('node-simple-fanout', {type: 'fanout'}, function(exchange) {
+ nonAmqExchangeCalledback = true;
+ });
+
+ connection.exchange('amq.topic', {type: 'topic'}, function(exchange) {
+ amqExchangeCalledback = true;
+ });
+ setTimeout( function() {
+ assert.ok(nonAmqExchangeCalledback, "non amq.* exchange callback method not called");
+ assert.ok(amqExchangeCalledback, "amq.topic exchange callback method not called");
+ connection.end();
+ connection.destroy();
+ }, 1000);
+});
+
+

0 comments on commit 6cf998d

Please sign in to comment.