loot tracker: batch loot submissions

This commit is contained in:
Adam
2019-08-18 12:26:33 -04:00
parent bd0badf7fc
commit c8ffa3994d
5 changed files with 98 additions and 27 deletions

View File

@@ -83,10 +83,10 @@ public class LootTrackerControllerTest
lootRecord.setTime(Instant.now());
lootRecord.setDrops(Collections.singletonList(new GameItem(4151, 1)));
String data = RuneLiteAPI.GSON.toJson(lootRecord);
String data = RuneLiteAPI.GSON.toJson(Collections.singletonList(lootRecord));
mockMvc.perform(post("/loottracker").content(data).contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk());
verify(lootTrackerService).store(eq(lootRecord), anyInt());
verify(lootTrackerService).store(eq(Collections.singletonList(lootRecord)), anyInt());
}
}