Added test to show failure of matching topics starting with a slash

This commit is contained in:
Doug Neiner 2013-04-30 20:04:05 -05:00
parent dcd8a357d4
commit 2e1bb06735

View file

@ -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();
} );
} );
});
} );
} );