use of com.furyviewer.domain.HatredArtist in project FuryViewer by TheDoctor-95.
the class HatredArtistResourceIntTest method updateHatredArtist.
@Test
@Transactional
public void updateHatredArtist() throws Exception {
// Initialize the database
hatredArtistRepository.saveAndFlush(hatredArtist);
int databaseSizeBeforeUpdate = hatredArtistRepository.findAll().size();
// Update the hatredArtist
HatredArtist updatedHatredArtist = hatredArtistRepository.findOne(hatredArtist.getId());
updatedHatredArtist.hated(UPDATED_HATED).date(UPDATED_DATE);
restHatredArtistMockMvc.perform(put("/api/hatred-artists").contentType(TestUtil.APPLICATION_JSON_UTF8).content(TestUtil.convertObjectToJsonBytes(updatedHatredArtist))).andExpect(status().isOk());
// Validate the HatredArtist in the database
List<HatredArtist> hatredArtistList = hatredArtistRepository.findAll();
assertThat(hatredArtistList).hasSize(databaseSizeBeforeUpdate);
HatredArtist testHatredArtist = hatredArtistList.get(hatredArtistList.size() - 1);
assertThat(testHatredArtist.isHated()).isEqualTo(UPDATED_HATED);
assertThat(testHatredArtist.getDate()).isEqualTo(UPDATED_DATE);
}
Aggregations