File tree 2 files changed +26
-3
lines changed
2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,30 @@ test("static super", function(){
41
41
42
42
equal ( Second . raise ( 2 ) , 4 )
43
43
44
- } )
44
+ } ) ;
45
+
46
+ test ( "findAll super" , function ( ) {
47
+
48
+ var Parent = can . Model ( {
49
+ findAll : function ( ) {
50
+ equal ( this . shortName , 'child' ) ;
51
+ return new can . Deferred ( ) ;
52
+ } ,
53
+ shortName : 'parent'
54
+ } , { } ) ;
55
+
56
+ var Child = Parent ( {
57
+ findAll : function ( ) {
58
+ return this . _super ( ) ;
59
+ } ,
60
+ shortName : 'child'
61
+ } , { } ) ;
62
+
63
+ stop ( ) ;
64
+ expect ( 1 ) ;
65
+ Child . findAll ( { } ) ;
66
+ start ( ) ;
67
+ } ) ;
45
68
46
69
/* Not sure I want to fix this yet.
47
70
test("Super in derived when parent doesn't have init", function(){
Original file line number Diff line number Diff line change @@ -498,8 +498,8 @@ steal('can/observe',function(){
498
498
// Increment requests.
499
499
self . _reqs ++ ;
500
500
// Make the request.
501
- return pipe ( old . call ( self , params ) ,
502
- self ,
501
+ return pipe ( old . call ( this , params ) ,
502
+ this ,
503
503
method ) . then ( success , error ) . then ( clean , clean ) ;
504
504
}
505
505
You can’t perform that action at this time.
0 commit comments