Commit 701b45d180cddecb584021c0cebeca4c6a92108d

Authored by jcartign
1 parent 78294e2c

Removing extra tests checking two-level dependencies

src/test/java/fr/plil/sio/persistence/jpa/GroupServiceTest.java
@@ -92,8 +92,6 @@ public class GroupServiceTest { @@ -92,8 +92,6 @@ public class GroupServiceTest {
92 Group group = groupService.findByName("group"); 92 Group group = groupService.findByName("group");
93 assertEquals(1, group.getRights().size()); 93 assertEquals(1, group.getRights().size());
94 assertEquals("parent", group.getRights().get(0).getName()); 94 assertEquals("parent", group.getRights().get(0).getName());
95 - assertEquals(1, group.getRights().get(0).getSiblings().size());  
96 - assertEquals("sibling", group.getRights().get(0).getSiblings().iterator().next().getName());  
97 } 95 }
98 96
99 @Test 97 @Test
@@ -127,8 +125,8 @@ public class GroupServiceTest { @@ -127,8 +125,8 @@ public class GroupServiceTest {
127 assertEquals(0, group.getRights().size()); 125 assertEquals(0, group.getRights().size());
128 } 126 }
129 127
130 - @Test  
131 - public void testRemoveRightIfNotPresent() { 128 + @Test(expected = IllegalArgumentException.class)
  129 + public void testRemoveRightIfNotInDatabase() {
132 Right right = new Right(); 130 Right right = new Right();
133 right.setName("not-a-right"); 131 right.setName("not-a-right");
134 assertFalse(groupService.removeRight("group", right)); 132 assertFalse(groupService.removeRight("group", right));