diff options
Diffstat (limited to 'test/angular-mocksSpec.js')
| -rw-r--r-- | test/angular-mocksSpec.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/angular-mocksSpec.js b/test/angular-mocksSpec.js index b85503e6..a30c3497 100644 --- a/test/angular-mocksSpec.js +++ b/test/angular-mocksSpec.js @@ -130,13 +130,9 @@ describe('mocks', function(){ it('should throw error when no third param but toString called', function() { - var t = new TzDate(0, 0); - try { - t.toString(); - } catch(err) { - expect(err.name).toBe('MethodNotImplemented'); - } - }) + expect(function() { new TzDate(0,0).toString() }). + toThrow('Method \'toString\' is not implemented in the TzDate mock'); + }); }); describe('$log mock', function() { |
