use of com.gitblit.tickets.TicketLabel in project gitblit by gitblit.
the class TicketServiceTest method testLabels.
@Test
public void testLabels() throws Exception {
service.createLabel(getRepository(), "L1", "james");
service.createLabel(getRepository(), "L2", "frank");
service.createLabel(getRepository(), "L3", "joe");
List<TicketLabel> labels = service.getLabels(getRepository());
assertEquals("Unexpected open labels count", 3, labels.size());
for (TicketLabel label : labels) {
label.color = "#ffff00";
assertTrue("failed to update label " + label.name, service.updateLabel(getRepository(), label, "ted"));
}
labels = service.getLabels(getRepository());
assertEquals("Unexpected labels count", 3, labels.size());
for (TicketLabel label : labels) {
assertTrue("failed to delete label " + label.name, service.deleteLabel(getRepository(), label.name, "lucifer"));
}
}
Aggregations