mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 10:41:06 +01:00
template engine has to use UberClassLoader
This commit is contained in:
@@ -33,6 +33,12 @@
|
||||
|
||||
package sonia.scm.template;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import sonia.scm.plugin.PluginLoader;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.InputStream;
|
||||
@@ -57,7 +63,12 @@ public class MustacheTemplateEngineTest extends TemplateEngineTestBase
|
||||
@Override
|
||||
public TemplateEngine createEngine(ServletContext context)
|
||||
{
|
||||
return new MustacheTemplateEngine(context);
|
||||
PluginLoader loader = mock(PluginLoader.class);
|
||||
|
||||
when(loader.getUberClassLoader()).thenReturn(
|
||||
Thread.currentThread().getContextClassLoader());
|
||||
|
||||
return new MustacheTemplateEngine(context, loader);
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user