Skip to content

Commit cd3a8b8

Browse files
committed
MAGETWO-31785: Exception in customerGroups/search API when send request using GET method without search creteria
- Added assertion for HTTP error code
1 parent 7091188 commit cd3a8b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dev/tests/api-functional/testsuite/Magento/Webapi/DeserializationTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public function testPostRequestWithEmptyBody()
4242
try {
4343
$this->_webApiCall($serviceInfo, CurlClient::EMPTY_REQUEST_BODY);
4444
} catch (\Exception $e) {
45+
$this->assertEquals(\Magento\Webapi\Exception::HTTP_BAD_REQUEST, $e->getCode());
4546
$this->assertContains(
4647
$expectedMessage,
4748
$e->getMessage(),
@@ -67,6 +68,7 @@ public function testPutRequestWithEmptyBody()
6768
try {
6869
$this->_webApiCall($serviceInfo, CurlClient::EMPTY_REQUEST_BODY);
6970
} catch (\Exception $e) {
71+
$this->assertEquals(\Magento\Webapi\Exception::HTTP_BAD_REQUEST, $e->getCode());
7072
$this->assertContains(
7173
$expectedMessage,
7274
$e->getMessage(),

0 commit comments

Comments
 (0)