@@ -912,7 +912,7 @@ moduleFor('Helpers test: closure {{action}}', class extends RenderingTest {
912912 this . assert . equal ( actualValue , newValue , 'property is read' ) ;
913913 }
914914
915- [ '@test action closure does not get auto-mut wrapped' ] ( ) {
915+ [ '@test action closure does not get auto-mut wrapped' ] ( assert ) {
916916 let first = 'raging robert' ;
917917 let second = 'mild machty' ;
918918 let returnValue = 'butch brian' ;
@@ -928,7 +928,14 @@ moduleFor('Helpers test: closure {{action}}', class extends RenderingTest {
928928 innerComponent = this ;
929929 } ,
930930 fireAction ( ) {
931- actualReturnedValue = this . attrs . submit ( second ) ;
931+ this . get ( 'submit' ) ( second ) ;
932+ this . get ( 'attrs-submit' ) ( second ) ;
933+ let attrsSubmitReturnValue = this . attrs [ 'attrs-submit' ] ( second ) ;
934+ let submitReturnValue = this . attrs . submit ( second ) ;
935+
936+ assert . equal ( attrsSubmitReturnValue , submitReturnValue , 'both attrs.foo and foo should behave the same' ) ;
937+
938+ return submitReturnValue ;
932939 }
933940 } ) ;
934941
@@ -952,7 +959,7 @@ moduleFor('Helpers test: closure {{action}}', class extends RenderingTest {
952959
953960 this . registerComponent ( 'middle-component' , {
954961 ComponentClass : MiddleComponent ,
955- template : `{{inner-component submit=attrs.submit}}`
962+ template : `{{inner-component attrs- submit=attrs.submit submit= submit}}`
956963 } ) ;
957964
958965 this . registerComponent ( 'outer-component' , {
@@ -963,7 +970,7 @@ moduleFor('Helpers test: closure {{action}}', class extends RenderingTest {
963970 this . render ( '{{outer-component}}' ) ;
964971
965972 this . runTask ( ( ) => {
966- innerComponent . fireAction ( ) ;
973+ actualReturnedValue = innerComponent . fireAction ( ) ;
967974 } ) ;
968975
969976 this . assert . equal ( actualFirst , first , 'first argument is correct' ) ;
0 commit comments