Fix spec to work with new event binding routine.
Showing
1 changed file
with
1 additions
and
13 deletions
... | @@ -101,19 +101,7 @@ describe('Rivets.Binding', function() { | ... | @@ -101,19 +101,7 @@ describe('Rivets.Binding', function() { |
101 | spyOn(binding, 'routine'); | 101 | spyOn(binding, 'routine'); |
102 | func = function() { return 1 + 2; } | 102 | func = function() { return 1 + 2; } |
103 | binding.set(func); | 103 | binding.set(func); |
104 | expect(binding.routine).toHaveBeenCalledWith(el, func, undefined); | 104 | expect(binding.routine).toHaveBeenCalledWith(el, binding.model, func, undefined); |
105 | }); | ||
106 | |||
107 | it('passes the previously set funcation as the current listener on subsequent calls', function() { | ||
108 | spyOn(binding, 'routine'); | ||
109 | funca = function() { return 1 + 2; }; | ||
110 | funcb = function() { return 2 + 5; }; | ||
111 | |||
112 | binding.set(funca); | ||
113 | expect(binding.routine).toHaveBeenCalledWith(el, funca, undefined); | ||
114 | |||
115 | binding.set(funcb); | ||
116 | expect(binding.routine).toHaveBeenCalledWith(el, funcb, funca); | ||
117 | }); | 105 | }); |
118 | }); | 106 | }); |
119 | 107 | ... | ... |
-
Please register or sign in to post a comment