diff options
| author | Jesse Morgan <jesse@jesterpm.net> | 2016-09-21 21:56:57 -0700 | 
|---|---|---|
| committer | Jesse Morgan <jesse@jesterpm.net> | 2016-09-21 21:56:57 -0700 | 
| commit | 23d1bd2dfbbbd2a5dd975d085e8a9f092464e76e (patch) | |
| tree | bba7d911cedce2fbd4e3fa74be1fef43f512652a /src/test | |
| parent | 34513e1fd739896e7151cb5ec18915fb881f5e46 (diff) | |
Switching individual_profile_from_login_password to POST
The CCB API has changed such that the
individual_profile_from_login_password API now expects the username and
password to be sent as a form body.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/java/com/p4square/ccbapi/CCBAPIClientTest.java | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/src/test/java/com/p4square/ccbapi/CCBAPIClientTest.java b/src/test/java/com/p4square/ccbapi/CCBAPIClientTest.java index b7d32e1..71427b5 100644 --- a/src/test/java/com/p4square/ccbapi/CCBAPIClientTest.java +++ b/src/test/java/com/p4square/ccbapi/CCBAPIClientTest.java @@ -158,10 +158,10 @@ public class CCBAPIClientTest {      @Test      public void testGetIndividualProfilesByLogin() throws Exception {          // Set expectation. -        URI expectedURI = new URI("https://localhost:8080/api.php?" -                + "srv=individual_profile_from_login_password&password=pass&login=user"); +        URI expectedURI = new URI("https://localhost:8080/api.php?srv=individual_profile_from_login_password"); +        byte[] expectedForm = "login=user&password=pass".getBytes();          InputStream is = getClass().getResourceAsStream("model/ccb_individual_profile_response.xml"); -        EasyMock.expect(mockHttpClient.sendPostRequest(expectedURI, null)) +        EasyMock.expect(mockHttpClient.sendPostRequest(EasyMock.eq(expectedURI), EasyMock.aryEq(expectedForm)))                  .andReturn(is);          EasyMock.replay(mockHttpClient); | 
