aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ExternalApiTest.js12
-rw-r--r--test/formsTest.js4
-rw-r--r--test/testabilityPatch.js8
3 files changed, 19 insertions, 5 deletions
diff --git a/test/ExternalApiTest.js b/test/ExternalApiTest.js
new file mode 100644
index 00000000..08771c49
--- /dev/null
+++ b/test/ExternalApiTest.js
@@ -0,0 +1,12 @@
+ExternalApiTest = TestCase("ExternalApiTest");
+
+ExternalApiTest.prototype = {
+ testItShouldExposefactory:function(){
+ var node = $('<div ng-init="a=1">{{b=a+1}}</div>')[0];
+ var settings = {};
+ var angular = angularFactory(settings);
+ var scope = angular.compile(node);
+ assertEquals(1, scope.get('a'));
+ assertEquals(2, scope.get('b'));
+ }
+};
diff --git a/test/formsTest.js b/test/formsTest.js
index e834e938..66c4ec69 100644
--- a/test/formsTest.js
+++ b/test/formsTest.js
@@ -16,7 +16,3 @@ nglrTest.prototype.testBind = function(){
assertEquals(arg, 'arg');
}).apply('XXX', ['arg']);
};
-
-
-
-
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js
index 5fca3524..13378d36 100644
--- a/test/testabilityPatch.js
+++ b/test/testabilityPatch.js
@@ -13,6 +13,12 @@ function noop(){}
jstd = jstestdriver;
+swfobject = {
+ createSwf:function(){
+ fail("must mock out swfobject.createSwf in test.");
+ }
+};
+
function html(content) {
return jQuery("<div></div>").html(content);
}
@@ -126,4 +132,4 @@ function assertThrows(error, fn){
fail("Expecting exception, none thrown");
}
assertEquals(error, exception);
-} \ No newline at end of file
+}