Fix the payload used to add a label to an issue

This commit is contained in:
Andy Wilkinson
2015-12-09 09:51:13 +00:00
parent 047b3bf65d
commit a4266ef86c
2 changed files with 3 additions and 5 deletions

View File

@@ -159,8 +159,8 @@ public class GitHubTemplateTests {
@Test
public void addLabelToIssue() {
this.server.expect(requestTo("labelsUrl")).andExpect(method(HttpMethod.POST))
.andExpect(basicAuth())
.andExpect(content().string("{\"labels\":[\"test\"]}")).andRespond(
.andExpect(basicAuth()).andExpect(content().string("[\"test\"]"))
.andRespond(
withSuccess("[{\"name\":\"test\"}]", MediaType.APPLICATION_JSON));
Issue issue = new Issue("issueUrl", null, null, "labelsUrl{/name}", null, null,
null, null);