From 2e1bb06735d73095bad4e0f9de9cd9af079d594a Mon Sep 17 00:00:00 2001 From: Doug Neiner Date: Tue, 30 Apr 2013 20:04:05 -0500 Subject: [PATCH] Added test to show failure of matching topics starting with a slash --- spec/AmqpBindingsResolver.spec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/AmqpBindingsResolver.spec.js b/spec/AmqpBindingsResolver.spec.js index 4b74280..143ead6 100644 --- a/spec/AmqpBindingsResolver.spec.js +++ b/spec/AmqpBindingsResolver.spec.js @@ -454,6 +454,16 @@ describe( "amqpBindingsResolver", function () { expect( cached ).to.be.ok(); } ); } ); + describe( "With topic '/sample/topic' and binding '/sample/topic'", function () { + var result = bindingsResolver.compare( "/sample/topic", "/sample/topic" ), + cached = bindingsResolver.cache["/sample/topic"] ? bindingsResolver.cache["/sample/topic"]["/sample/topic"] : null; + it( "Result should be true", function () { + expect( result ).to.be.ok(); + } ); + it( "Should create a resolver cache entry", function () { + expect( cached ).to.be.ok(); + } ); + } ); }); } ); } ); \ No newline at end of file