Search in sources :

Example 1 with Labels

use of com.jcabi.github.Labels in project jcabi-github by jcabi.

the class MkLabelsTest method deletesLabels.

/**
 * MkLabels can delete labels.
 * @throws Exception If some problem inside
 */
@Test
public void deletesLabels() throws Exception {
    final Repo repo = new MkGithub().randomRepo();
    final Labels labels = repo.labels();
    final String name = "label-0";
    labels.create(name, "e1e1e1");
    final Issue issue = repo.issues().create("hey, you!", "");
    issue.labels().add(Collections.singletonList(name));
    labels.delete(name);
    MatcherAssert.assertThat(repo.labels().iterate(), Matchers.emptyIterable());
    MatcherAssert.assertThat(issue.labels().iterate(), Matchers.emptyIterable());
}
Also used : Issue(com.jcabi.github.Issue) Repo(com.jcabi.github.Repo) Labels(com.jcabi.github.Labels) Test(org.junit.Test)

Aggregations

Issue (com.jcabi.github.Issue)1 Labels (com.jcabi.github.Labels)1 Repo (com.jcabi.github.Repo)1 Test (org.junit.Test)1