diff --git a/observe/observe_test.js b/observe/observe_test.js index 83015287163..e9fb48bf9b1 100644 --- a/observe/observe_test.js +++ b/observe/observe_test.js @@ -321,4 +321,16 @@ test("recursive observers do not cause stack overflow", function() { console.log("adding") a.attr("b", b); -}); \ No newline at end of file +}); + +test("bind to specific attribute changes", function() { + var paginate = new can.Observe( { offset: 100, limit: 100, count: 2000 } ); + paginate.bind( 'offset', function( ev, newVal, oldVal ) { + equals(newVal, 200); + equals(oldVal, 100); + // newVal = 200 + // oldVal = 100 + }); + paginate.attr( 'offset', 200 ); +}); +