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());
}