@@ -58,29 +58,36 @@ main() {
58
58
59
59
60
60
it ('should bind to Custom Element properties' , () {
61
- registerElement ('tests-bound' , {'prop-y ' : 10 });
61
+ registerElement ('tests-bound' , {'propY ' : 10 });
62
62
compileAndUpgrade ('<tests-bound bind-prop-y=27></tests-bound>' );
63
63
64
64
// Scope has not been digested yet
65
- expect (customProp ('prop-y ' )).toEqual (10 );
65
+ expect (customProp ('propY ' )).toEqual (10 );
66
66
67
67
_.rootScope.apply ();
68
- expect (customProp ('prop-y ' )).toEqual (27 );
68
+ expect (customProp ('propY ' )).toEqual (27 );
69
69
});
70
70
71
71
72
72
it ('should bind to a non-existent property' , () {
73
73
registerElement ('tests-empty' , {});
74
- compileAndUpgrade ('<tests-empty bind-new-prop =27></tests-empty>' );
74
+ compileAndUpgrade ('<tests-empty bind-newprop =27></tests-empty>' );
75
75
_.rootScope.apply ();
76
- expect (customProp ('new-prop' )).toEqual (27 );
76
+ expect (customProp ('newprop' )).toEqual (27 );
77
+ });
78
+
79
+ it ('should bind to a camelCase property' , () {
80
+ registerElement ('tests-camel' , {});
81
+ compileAndUpgrade ('<tests-camel bind-new-prop=27></tests-camel>' );
82
+ _.rootScope.apply ();
83
+ expect (customProp ('newProp' )).toEqual (27 );
77
84
});
78
85
79
86
it ('should bind to both directives and properties' , () {
80
87
registerElement ('tests-double' , {});
81
88
compileAndUpgrade ('<tests-double ng-bind bind-ng-bind="\' hello\' "></tests-double>' );
82
89
_.rootScope.apply ();
83
- expect (customProp ('ng-bind ' )).toEqual ("hello" );
90
+ expect (customProp ('ngBind ' )).toEqual ("hello" );
84
91
expect (_.rootElement).toHaveText ('hello' );
85
92
});
86
93
0 commit comments