Search in sources :

Example 6 with HomeShortcut

use of org.kie.workbench.common.screens.home.model.HomeShortcut in project kie-wb-common by kiegroup.

the class ShortcutPresenterTest method setupWithNoActionPermissionTest.

@Test
public void setupWithNoActionPermissionTest() {
    doReturn(false).when(shortcutHelper).authorize(any(HomeShortcut.class));
    final HomeShortcut shortcut = ModelUtils.makeShortcut("iconCss", "heading", "subHeadingPrefix", mock(Command.class));
    presenter.setup(shortcut);
    verify(view, never()).setAction(shortcut.getOnClickCommand());
}
Also used : HomeShortcut(org.kie.workbench.common.screens.home.model.HomeShortcut) Command(org.uberfire.mvp.Command) Test(org.junit.Test)

Aggregations

HomeShortcut (org.kie.workbench.common.screens.home.model.HomeShortcut)6 HomeShortcutLink (org.kie.workbench.common.screens.home.model.HomeShortcutLink)5 HomeModel (org.kie.workbench.common.screens.home.model.HomeModel)4 Test (org.junit.Test)2 Command (org.uberfire.mvp.Command)2