Skip to content

Commit

Permalink
resolved minor issue from response of post
Browse files Browse the repository at this point in the history
  • Loading branch information
allemaos committed May 18, 2018
1 parent 8470c3a commit a3b8a8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class UrlController {

String shortUrl = urlService.addUrl(longUrl);
if(shortUrl != null)
return shortUrl;
return RESOURCE_URI + "/" + shortUrl;

return ErrorMessage.BAD_REQUEST_EMPTY_URL.getMessage();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ public void test__postUrl() throws Exception{
.content(longUrl))
.andExpect(status().isOk())
.andExpect(content().contentType("text/plain;charset=ISO-8859-1"))
//fixme-allemaos: this TEST_RESOURCE_URI shouldn't be empty
// .andExpect(content().string(TEST_RESOURCE_URI+"/"+shortUrl))
.andExpect(content().string(shortUrl))
.andExpect(content().string(TEST_RESOURCE_URI+"/"+shortUrl))
.andDo(print());
}

Expand Down

0 comments on commit a3b8a8d

Please sign in to comment.