Skip to content

Commit ef9c0c9

Browse files
committed
MAGETWO-56156: [GITHUB] Using API cannot create Tax Rate with a zero rate #4873
1 parent 7f70942 commit ef9c0c9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxRateRepositoryTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ public function testCreateTaxRateExistingCode()
140140

141141
public function testCreateTaxRateWithoutValue()
142142
{
143-
$expectedMessage = '%fieldName is a required field.';
144143
$data = [
145144
'tax_rate' => [
146145
'tax_country_id' => 'US',
@@ -166,13 +165,13 @@ public function testCreateTaxRateWithoutValue()
166165
$this->fail('Expected exception was not raised');
167166
} catch (\SoapFault $e) {
168167
$this->assertContains(
169-
$expectedMessage,
168+
'SOAP-ERROR: Encoding: object has no \'rate\' property',
170169
$e->getMessage(),
171170
'SoapFault does not contain expected message.'
172171
);
173172
} catch (\Exception $e) {
174173
$errorObj = $this->processRestExceptionResult($e);
175-
$this->assertEquals($expectedMessage, $errorObj['message']);
174+
$this->assertEquals('%fieldName is a required field.', $errorObj['message']);
176175
$this->assertEquals(['fieldName' => 'percentage_rate'], $errorObj['parameters']);
177176
}
178177
}

0 commit comments

Comments
 (0)