use of org.candlepin.dto.manifest.v1.ConsumerTypeDTO in project candlepin by candlepin.
the class ConsumerTypeResourceTest method testUpdateTypeUpdatesNothing.
@Test
public void testUpdateTypeUpdatesNothing() {
String label = this.testType.getLabel();
boolean manifest = this.testType.isManifest();
ConsumerTypeDTO dto = new ConsumerTypeDTO();
dto.setId(this.testType.getId());
// Update the type with our DTO
ConsumerTypeDTO output = this.consumerTypeResource.update(dto);
assertNotNull(output);
assertEquals(label, output.getLabel());
assertEquals(manifest, output.isManifest());
// Flush & clear DB state
this.consumerTypeCurator.flush();
this.consumerTypeCurator.clear();
// Ensure the update changed nothing in the DB
ConsumerType existing = this.consumerTypeCurator.find(this.testType.getId());
assertNotNull(existing);
assertEquals(label, existing.getLabel());
assertEquals(manifest, existing.isManifest());
}
Aggregations