Search in sources :

Example 1 with TicketLabel

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"));
    }
}
Also used : TicketLabel(com.gitblit.tickets.TicketLabel) Test(org.junit.Test)

Aggregations

TicketLabel (com.gitblit.tickets.TicketLabel)1 Test (org.junit.Test)1