Search in sources :

Example 6 with HatredArtist

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);
}
Also used : HatredArtist(com.furyviewer.domain.HatredArtist) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

HatredArtist (com.furyviewer.domain.HatredArtist)6 Timed (com.codahale.metrics.annotation.Timed)3 Test (org.junit.Test)3 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)3 Transactional (org.springframework.transaction.annotation.Transactional)3 BadRequestAlertException (com.furyviewer.web.rest.errors.BadRequestAlertException)1 URI (java.net.URI)1