From b8ea7f6aba2e675b85826b0bee1f21ddd7b866a5 Mon Sep 17 00:00:00 2001
From: Igor Minar
Date: Fri, 24 May 2013 11:00:14 -0700
Subject: feat(ngError): add error message compression and better error
 messages
- add toThrowNg matcher
---
 test/ng/directive/inputSpec.js | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
(limited to 'test/ng/directive/inputSpec.js')
diff --git a/test/ng/directive/inputSpec.js b/test/ng/directive/inputSpec.js
index f8898074..68caf1f5 100644
--- a/test/ng/directive/inputSpec.js
+++ b/test/ng/directive/inputSpec.js
@@ -43,7 +43,7 @@ describe('NgModelController', function() {
     }
 
     expect(exception.message).
-        toMatch(/Non-assignable model expression: 1\+2 \(\)/);
+        toMatch(/^\[NgErr6\] ngModel error! Expression '1\+2' is non\-assignable\. Element: $/);
   }));
 
 
@@ -457,7 +457,7 @@ describe('input', function() {
     expect(function() {
       compileInput('');
       scope.$digest();
-    }).toThrow("Syntax Error: Token '''' is an unexpected token at column 7 of the expression [throw ''] starting at [''].");
+    }).toThrow("[NgErr24] Syntax Error: Token '''' is an unexpected token at column 7 of the expression [throw ''] starting at [''].");
   });
 
 
@@ -548,11 +548,11 @@ describe('input', function() {
     });
 
 
-    xit('should throw an error when scope pattern can\'t be found', function() {
-      compileInput('');
-
-      expect(function() { changeInputValueTo('xx'); }).
-          toThrow('Expected fooRegexp to be a RegExp but was undefined');
+    it('should throw an error when scope pattern can\'t be found', function() {
+      expect(function() {
+        compileInput('');
+        scope.$apply();
+      }).toThrowNg('ngPattern error! Expected fooRegexp to be a RegExp but was undefined.');
     });
   });
 
-- 
cgit v1.2.3