From cf331050112ee973b9e8186dc4741028ca22f024 Mon Sep 17 00:00:00 2001 From: Shyam Seshadri Date: Thu, 12 Aug 2010 02:42:04 +0800 Subject: Fix toEqual matcher to use angular.equals instead of simple == comparison, which breaks down for arrays and objects --- test/scenario/MatcherSpec.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/scenario/MatcherSpec.js') 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 -- cgit v1.2.3