Skip to content

Commit

Permalink
Merge pull request #6 from kedodrill/fix-patch-inventory
Browse files Browse the repository at this point in the history
Fix Patch Inventory
  • Loading branch information
kedodrill committed Apr 30, 2019
2 parents 3edad0d + 4ae6457 commit afe73c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Inventory/PatchInventory.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function sendRequest(array $invArr = null)
switch ($statusCode)
{
case 200:
return $messageArr['body'];
return $response;
case 401:
throw new \Exception("401 Unauthorized - HTTP Basic: Access denied.");
break;
Expand Down
4 changes: 2 additions & 2 deletions tests/Inventory/PatchInventoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public function testPatchInventoryApiCallSuccessfullyUpdateItems()
$patchInventory = new PatchInventory($accountToken, $secretKey, $mockClient);

// Get the JSON response from the request
$responseStr = $patchInventory->sendRequest($inventoryArray);
$response = $patchInventory->sendRequest($inventoryArray);

$this->assertEquals($responseStr, 'Request received');
$this->assertEquals(200, $response->getStatusCode());
} // End public function testPatchInventoryApiCallSuccessfullyUpdateItems

public function testPatchInventoryApiCallMoreThan50ItemsError()
Expand Down

0 comments on commit afe73c4

Please sign in to comment.