aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario/MatcherSpec.js
diff options
context:
space:
mode:
authorShyam Seshadri2010-08-11 11:42:04 -0700
committerShyam Seshadri2010-08-11 11:42:04 -0700
commitb27fb8a6448b7c8d59b533fe2df9497170fbaa70 (patch)
treee211cd3499813bc144bb94a2206dce958d01863b /test/scenario/MatcherSpec.js
parent567341c10fc7f74d5333f27514bb2201f1dbee42 (diff)
downloadangular.js-b27fb8a6448b7c8d59b533fe2df9497170fbaa70.tar.bz2
Fix toEqual matcher to use angular.equals instead of simple == comparison, which breaks down for arrays and objects
Diffstat (limited to 'test/scenario/MatcherSpec.js')
-rw-r--r--test/scenario/MatcherSpec.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/scenario/MatcherSpec.js b/test/scenario/MatcherSpec.js
index c47f0c25..2eddd2bc 100644
--- a/test/scenario/MatcherSpec.js
+++ b/test/scenario/MatcherSpec.js
@@ -27,4 +27,12 @@ describe('Matcher', function () {
expect(e).toEqual('Expected 456 but was 123');
}
});
+ it('should correctly match arrays', function() {
+ var future = $scenario.addFuture('Calculate first future', function(done) {
+ done(['a', 'b']);
+ });
+ matcher = new Matcher(this, future);
+ matcher.toEqual(['a', 'b']);
+ executeFutures();
+ });
}); \ No newline at end of file