* @throws Exception if some problem inside
*/
@Test
public void canRemoveFileFromBranch() throws Exception {
final String branch = "branch-1";
final Repo repo = MkContentsTest.repo();
final String path = "removeme.txt";
this.createFile(repo, path);
final JsonObject json = MkContentsTest
.content(path, "theDeleteMessage")
.add("ref", branch)
.add("committer", MkContentsTest.committer())
.build();
final RepoCommit commit = repo.contents().remove(json);
MatcherAssert.assertThat(commit, Matchers.notNullValue());
MatcherAssert.assertThat(
commit.json().getString("message"),
Matchers.equalTo("theDeleteMessage")
);