Commit 65894abf authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '160-left-panel-description' into 'master'

fix on unit test

Closes #160

See merge request !82
parents 34895538 1c1e7142
......@@ -41,6 +41,7 @@ public class ConfigurationBeanTest extends WebTestFunctions {
user2 = new User();
userService.addUser(user2);
userService.setUserPrivilege(user2, PrivilegeType.CONFIGURATION_MANAGE);
userService.setUserPrivilege(user2, PrivilegeType.ADD_MAP);
uBean.setLoggedUser(user2);
oldValue = configurationService.getConfigurationValue(ConfigurationElementType.DEFAULT_MAP);
......@@ -54,35 +55,6 @@ public class ConfigurationBeanTest extends WebTestFunctions {
configurationService.setConfigurationValue(ConfigurationElementType.DEFAULT_MAP, oldValue);
}
@Test
public void test() throws Exception {
try {
cBean.refreshValues(null);
assertTrue(cBean.getValues().size() > 0);
List<ConfigurationView> list = new ArrayList<ConfigurationView>();
ConfigurationView element = configurationViewFactory.create(configurationDao.getByType(ConfigurationElementType.DEFAULT_MAP));
element.setValue("sdfsa");
list.add(element);
// rollback should appear
cBean.setValues(list);
assertTrue(cBean.getValues().size() != 1);
for (ProjectView row : projectService.getAllProjectViews()) {
if (row.getProjectId() == null)
continue;
element.setValue(row.getProjectId());
cBean.setValues(list);
assertEquals(cBean.getValues(), list);
cBean.setValues(new ArrayList<ConfigurationView>());
}
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
/**
* Checks if bean implements {@link Serializable} properly.
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment