2012-04-21 04:56:40 +00:00
|
|
|
QUnit.specify( "postal.js", function () {
|
|
|
|
|
describe( "bindingsResolver", function () {
|
|
|
|
|
describe( "When calling compare", function () {
|
|
|
|
|
describe( "With topic Top.Middle.Bottom and binding Top.Middle.Bottom", function () {
|
|
|
|
|
var result = bindingsResolver.compare( "Top.Middle.Bottom", "Top.Middle.Bottom" ),
|
2012-03-22 05:34:53 +00:00
|
|
|
cached = bindingsResolver.cache["Top.Middle.Bottom"]["Top.Middle.Bottom"];
|
2012-04-21 04:56:40 +00:00
|
|
|
it( "Result should be true", function () {
|
|
|
|
|
assert( result ).isTrue();
|
|
|
|
|
} );
|
|
|
|
|
it( "Should create a resolver cache entry", function () {
|
|
|
|
|
assert( cached ).isTrue();
|
|
|
|
|
} );
|
|
|
|
|
} );
|
|
|
|
|
describe( "With topic Top.Middle.Bottom and binding Top.#.Bottom", function () {
|
|
|
|
|
var result = bindingsResolver.compare( "Top.#.Bottom", "Top.Middle.Bottom" ),
|
2012-03-22 05:34:53 +00:00
|
|
|
cached = bindingsResolver.cache["Top.Middle.Bottom"]["Top.#.Bottom"];
|
2012-04-21 04:56:40 +00:00
|
|
|
it( "Result should be true", function () {
|
|
|
|
|
assert( result ).isTrue();
|
|
|
|
|
} );
|
|
|
|
|
it( "Should create a resolver cache entry", function () {
|
|
|
|
|
assert( cached ).isTrue();
|
|
|
|
|
} );
|
|
|
|
|
} );
|
|
|
|
|
describe( "With topic Top.Middle.Bottom and binding Top.*.Bottom", function () {
|
|
|
|
|
var result = bindingsResolver.compare( "Top.*.Bottom", "Top.Middle.Bottom" ),
|
2012-03-22 05:34:53 +00:00
|
|
|
cached = bindingsResolver.cache["Top.Middle.Bottom"]["Top.*.Bottom"];
|
2012-04-21 04:56:40 +00:00
|
|
|
it( "Result should be true", function () {
|
|
|
|
|
assert( result ).isTrue();
|
|
|
|
|
} );
|
|
|
|
|
it( "Should create a resolver cache entry", function () {
|
|
|
|
|
assert( cached ).isTrue();
|
|
|
|
|
} );
|
|
|
|
|
} );
|
|
|
|
|
describe( "With topic Top.Middle.Bottom and binding #.*.Bottom", function () {
|
|
|
|
|
var result = bindingsResolver.compare( "#.*.Bottom", "Top.Middle.Bottom" ),
|
2012-03-22 05:34:53 +00:00
|
|
|
cached = bindingsResolver.cache["Top.Middle.Bottom"]["#.*.Bottom"];
|
2012-04-21 04:56:40 +00:00
|
|
|
it( "Result should be true", function () {
|
|
|
|
|
assert( result ).isTrue();
|
|
|
|
|
} );
|
|
|
|
|
it( "Should create a resolver cache entry", function () {
|
|
|
|
|
assert( cached ).isTrue();
|
|
|
|
|
} );
|
|
|
|
|
} );
|
|
|
|
|
} );
|
|
|
|
|
} );
|
|
|
|
|
} );
|