Skip to content

Commit

Permalink
Updated deleteSavedSearch
Browse files Browse the repository at this point in the history
  • Loading branch information
jdappel committed Nov 20, 2012
1 parent 7f2a6cc commit 629e2d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public SavedSearch createSavedSearch(String query) {

public void deleteSavedSearch(long searchId) {
requireAuthorization();
restTemplate.delete(buildUri("saved_searches/destroy/" + searchId + ".json"));
MultiValueMap<String, Object> data = new LinkedMultiValueMap<String, Object>();
restTemplate.postForObject(buildUri("saved_searches/destroy/" + searchId + ".json"), data, SavedSearch.class);
}

// Trends
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void createSavedSearch_unauthorized() {
@Test
public void deleteSavedSearch() {
mockServer.expect(requestTo("https://api.twitter.com/1.1/saved_searches/destroy/26897775.json"))
.andExpect(method(DELETE))
.andExpect(method(POST))
.andRespond(withSuccess("{}", APPLICATION_JSON));
twitter.searchOperations().deleteSavedSearch(26897775);
mockServer.verify();
Expand Down

0 comments on commit 629e2d5

Please sign in to comment.