Ensure that existing blockParams and depths are respected on dupe programs

Fixes #1186
This commit is contained in:
Charles O'Farrell
2016-02-20 07:20:27 +11:00
parent 27212f5953
commit c7be766902
2 changed files with 19 additions and 8 deletions
+9
View File
@@ -268,4 +268,13 @@ describe('Regressions', function() {
' 1. IF: John--\n'
+ ' 2. MYIF: John==\n');
});
it('GH-1186: Support block params for existing programs', function() {
var string =
'{{#*inline "test"}}{{> @partial-block }}{{/inline}}'
+ '{{#>test }}{{#each listOne as |item|}}{{ item }}{{/each}}{{/test}}'
+ '{{#>test }}{{#each listTwo as |item|}}{{ item }}{{/each}}{{/test}}';
shouldCompileTo(string, { listOne: ['a'], listTwo: ['b']}, 'ab', '');
});
});