1
0

improving branch coverage for AssetResourceIntTest

This commit is contained in:
Michael Hoennig
2019-04-20 10:47:01 +02:00
parent 9f95af7547
commit 7ba20b3687
5 changed files with 18 additions and 12 deletions

View File

@@ -689,11 +689,11 @@ public class AssetResourceIntTest {
// Delete the asset
restAssetMockMvc.perform(delete("/api/assets/{id}", asset.getId())
.accept(TestUtil.APPLICATION_JSON_UTF8))
.andExpect(status().isOk());
.andExpect(status().isBadRequest());
// Validate the database is empty
// Validate the database still contains the same number of assets
List<Asset> assetList = assetRepository.findAll();
assertThat(assetList).hasSize(databaseSizeBeforeDelete - 1);
assertThat(assetList).hasSize(databaseSizeBeforeDelete);
}
@Test