"permissionTemplate": {
"id": "af8cb8cc-1e78-4c4e-8c00-ee8e814009a5",
"name": "Finance",
- "description": "Permissions for financial related projects",
+ "description": "Permissions for financially related projects",
"projectKeyPattern": ".*\\.finance\\..*",
"createdAt": "2015-08-25T16:18:48+0200",
"updatedAt": "2015-08-25T16:18:48+0200"
"permissionTemplate": {
"id": "af8cb8cc-1e78-4c4e-8c00-ee8e814009a5",
"name": "Finance",
- "description": "Permissions for financial related projects",
+ "description": "Permissions for financially related projects",
"projectKeyPattern": ".*\\.finance\\..*",
- "createdAt": "2015-08-25T16:18:48+0200",
+ "createdAt": "2001-09-09T03:46:40+0200",
"updatedAt": "2015-08-25T16:18:48+0200"
}
}
public void create_full_permission_template() {
TestResponse result = newRequest("Finance", "Permissions for financially related projects", ".*\\.finance\\..*");
- assertJson(result.getInput()).isSimilarTo(getClass().getResource("CreateTemplateActionTest/create_template.json"));
+ assertJson(result.getInput())
+ .ignoreFields("id")
+ .isSimilarTo(getClass().getResource("create_template-example.json"));
PermissionTemplateDto finance = dbClient.permissionTemplateDao().selectByName(dbSession, "Finance");
assertThat(finance.getName()).isEqualTo("Finance");
assertThat(finance.getDescription()).isEqualTo("Permissions for financially related projects");
public void update_all_permission_template_fields() {
TestResponse result = newRequest(templateDto.getKee(), "Finance", "Permissions for financially related projects", ".*\\.finance\\..*");
- assertJson(result.getInput()).isSimilarTo(getClass().getResource("UpdateTemplateActionTest/update_template.json"));
+ assertJson(result.getInput())
+ .ignoreFields("id")
+ .isSimilarTo(getClass().getResource("update_template-example.json"));
PermissionTemplateDto finance = dbClient.permissionTemplateDao().selectByName(dbSession, "Finance");
assertThat(finance.getName()).isEqualTo("Finance");
assertThat(finance.getDescription()).isEqualTo("Permissions for financially related projects");
+++ /dev/null
-{
- "permissionTemplate": {
- "name": "Finance",
- "description": "Permissions for financially related projects",
- "projectKeyPattern": ".*\\.finance\\..*",
- "createdAt": "2015-08-25T16:18:48+0200",
- "updatedAt": "2015-08-25T16:18:48+0200"
- }
-}
+++ /dev/null
-{
- "permissionTemplate": {
- "name": "Finance",
- "description": "Permissions for financially related projects",
- "projectKeyPattern": ".*\\.finance\\..*",
- "createdAt": "2001-09-09T03:46:40+0200",
- "updatedAt": "2015-08-25T16:18:48+0200"
- }
-}