@@ -47,9 +47,12 @@ public class ClanElideTest extends AbstractIntegrationTest {
4747 @ Test
4848 @ WithUserDetails (AUTH_CLAN_LEADER )
4949 public void canDeleteMemberOfOwnClan () throws Exception {
50+ assertNotNull (playerRepository .getOne (12 ).getClan ());
51+
5052 mockMvc .perform (
5153 delete ("/data/clanMembership/2" )) // magic value from prepClanData.sql
5254 .andExpect (status ().isNoContent ());
55+ assertNull (playerRepository .getOne (12 ).getClan ());
5356 }
5457
5558 @ Test
@@ -73,9 +76,13 @@ public void cannotDeleteLeaderFromClan() throws Exception {
7376 @ Test
7477 @ WithUserDetails (AUTH_CLAN_MEMBER )
7578 public void canLeaveClan () throws Exception {
79+ assertNotNull (playerRepository .getOne (12 ).getClan ());
80+
7681 mockMvc .perform (
7782 delete ("/data/clanMembership/2" )) // magic value from prepClanData.sql
7883 .andExpect (status ().isNoContent ());
84+
85+ assertNull (playerRepository .getOne (12 ).getClan ());
7986 }
8087
8188 @ Test
@@ -99,22 +106,30 @@ public void getFilteredPlayerForClanInvite() throws Exception {
99106 @ Test
100107 @ WithUserDetails (AUTH_CLAN_LEADER )
101108 public void canTransferLeadershipAsLeader () throws Exception {
109+ assertThat (clanRepository .getOne (1 ).getLeader ().getLogin (), is (AUTH_CLAN_LEADER ));
110+
102111 mockMvc .perform (
103112 patch ("/data/clan/1" )
104113 .header (HttpHeaders .CONTENT_TYPE , JsonApiMediaType .JSON_API_MEDIA_TYPE )
105114 .content (generateTransferLeadershipContent (1 , 12 ))) // magic value from prepClanData.sql
106115 .andExpect (status ().isNoContent ());
116+
117+ assertThat (clanRepository .getOne (1 ).getLeader ().getLogin (), is (AUTH_CLAN_MEMBER ));
107118 }
108119
109120 @ Test
110121 @ WithUserDetails (AUTH_CLAN_MEMBER )
111122 public void cannotTransferLeadershipAsMember () throws Exception {
123+ assertThat (clanRepository .getOne (1 ).getLeader ().getLogin (), is (AUTH_CLAN_LEADER ));
124+
112125 mockMvc .perform (
113126 patch ("/data/clan/1" )
114127 .header (HttpHeaders .CONTENT_TYPE , JsonApiMediaType .JSON_API_MEDIA_TYPE )
115128 .content (generateTransferLeadershipContent (1 , 12 ))) // magic value from prepClanData.sql
116129 .andExpect (status ().isForbidden ())
117130 .andExpect (jsonPath ("$.errors[0].detail" , is ("UpdatePermission Denied" )));
131+
132+ assertThat (clanRepository .getOne (1 ).getLeader ().getLogin (), is (AUTH_CLAN_LEADER ));
118133 }
119134
120135 @ Test
0 commit comments