diff options
| author | Igor Minar | 2013-02-11 21:24:49 -0800 |
|---|---|---|
| committer | Igor Minar | 2013-02-11 22:13:15 -0800 |
| commit | c0a0781425625f45e47f3523f115616aa9447f21 (patch) | |
| tree | 4ea0ef7a632818ea2de8b3da53eb85fadad4d7fd /test | |
| parent | 035e0130f35c4ae1636ffc2822be4762c7b2cc4b (diff) | |
| download | angular.js-c0a0781425625f45e47f3523f115616aa9447f21.tar.bz2 | |
chore(matchers): fix hasBeenCalledOnceWith matcher
the error message was wrong and misleading
Diffstat (limited to 'test')
| -rw-r--r-- | test/matchers.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/matchers.js b/test/matchers.js index 6bfed257..3630c3b1 100644 --- a/test/matchers.js +++ b/test/matchers.js @@ -109,7 +109,7 @@ beforeEach(function() { if (this.actual.callCount != 1) { if (this.actual.callCount == 0) { return [ - 'Expected spy ' + this.actual.identity + ' to have been called with ' + + 'Expected spy ' + this.actual.identity + ' to have been called once with ' + jasmine.pp(expectedArgs) + ' but it was never called.', 'Expected spy ' + this.actual.identity + ' not to have been called with ' + jasmine.pp(expectedArgs) + ' but it was.' @@ -117,16 +117,16 @@ beforeEach(function() { } return [ - 'Expected spy ' + this.actual.identity + ' to have been called with ' + - jasmine.pp(expectedArgs) + ' but it was never called.', - 'Expected spy ' + this.actual.identity + ' not to have been called with ' + + 'Expected spy ' + this.actual.identity + ' to have been called once with ' + + jasmine.pp(expectedArgs) + ' but it was called ' + this.actual.callCount + ' times.', + 'Expected spy ' + this.actual.identity + ' not to have been called once with ' + jasmine.pp(expectedArgs) + ' but it was.' ]; } else { return [ - 'Expected spy ' + this.actual.identity + ' to have been called with ' + + 'Expected spy ' + this.actual.identity + ' to have been called once with ' + jasmine.pp(expectedArgs) + ' but was called with ' + jasmine.pp(this.actual.argsForCall), - 'Expected spy ' + this.actual.identity + ' not to have been called with ' + + 'Expected spy ' + this.actual.identity + ' not to have been called once with ' + jasmine.pp(expectedArgs) + ' but was called with ' + jasmine.pp(this.actual.argsForCall) ]; } |
