From 2f5dba488e855bcdbb9304aa809efcb9de7b43e9 Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Tue, 3 Apr 2012 15:03:27 -0700
Subject: fix(ng-href): copy even if no binding
Closes# 850
fixed an issue where ng-href would not copy its content into href if it did not contain binding.
---
test/ng/directive/booleanAttrDirSpecs.js | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
(limited to 'test')
diff --git a/test/ng/directive/booleanAttrDirSpecs.js b/test/ng/directive/booleanAttrDirSpecs.js
index 7a4244a8..aa84c1ae 100644
--- a/test/ng/directive/booleanAttrDirSpecs.js
+++ b/test/ng/directive/booleanAttrDirSpecs.js
@@ -10,7 +10,14 @@ describe('boolean attr directives', function() {
it('should bind href', inject(function($rootScope, $compile) {
element = $compile('')($rootScope)
- $rootScope.url = 'http://server'
+ $rootScope.url = 'http://server';
+ $rootScope.$digest();
+ expect(element.attr('href')).toEqual('http://server');
+ }));
+
+
+ it('should bind href even if no interpolation', inject(function($rootScope, $compile) {
+ element = $compile('')($rootScope)
$rootScope.$digest();
expect(element.attr('href')).toEqual('http://server');
}));
--
cgit v1.2.3