committed by
Andy Wilkinson
parent
53d24301d1
commit
ee40fb8cf1
@@ -137,4 +137,15 @@ public class ThymeleafAutoConfigurationTests {
|
||||
context.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void useDataDialect() throws Exception {
|
||||
this.context.register(ThymeleafAutoConfiguration.class,
|
||||
PropertyPlaceholderAutoConfiguration.class);
|
||||
this.context.refresh();
|
||||
TemplateEngine engine = this.context.getBean(TemplateEngine.class);
|
||||
Context attrs = new Context(Locale.UK, Collections.singletonMap("foo", "bar"));
|
||||
String result = engine.process("data-dialect", attrs);
|
||||
assertEquals("<html><body data-foo=\"bar\"></body></html>", result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<html><body data:foo="${foo}"></body></html>
|
||||
Reference in New Issue
Block a user