File tree Expand file tree Collapse file tree
handlebars/src/test/java/com/github/jknack/handlebars Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99import org .junit .Test ;
1010
11+ import static org .junit .Assert .assertEquals ;
12+ import static org .junit .Assert .assertNull ;
13+
1114public class InternalDataTest extends AbstractTest {
1215
1316 @ Override
@@ -34,6 +37,7 @@ protected Object configureContext(final Object model) {
3437 @ Test
3538 public void dataAvailableForRendering () throws IOException {
3639 shouldCompileTo ("{{foo}}" , "" , "foo" );
40+ assertEquals ("foo" , ((Context )configureContext ("" )).get ("foo" ));
3741 }
3842
3943 @ Test
@@ -47,6 +51,7 @@ public void internalDataNotAvailableForRendering() throws IOException {
4751 shouldCompileTo ("{{internalData.bar}}" , "" , "" );
4852 shouldCompileTo ("{{this.internalData}}" , "" , "" );
4953 shouldCompileTo ("{{this.internalData.bar}}" , "" , "" );
54+ assertNull (((Context )configureContext ("" )).get ("bar" ));
5055 }
5156
5257 @ Test
You can’t perform that action at this time.
0 commit comments