Skip to content

Commit 14cd2fe

Browse files
committed
MAGETWO-52179: [FT] Coupon creation by webapi handler was not successful. For SPECIFIC_TYPE
1 parent 1121148 commit 14cd2fe

File tree

1 file changed

+2
-2
lines changed
  • dev/tests/functional/tests/app/Magento/SalesRule/Test/Handler/SalesRule

1 file changed

+2
-2
lines changed

dev/tests/functional/tests/app/Magento/SalesRule/Test/Handler/SalesRule/Webapi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Webapi extends AbstractWebapi implements SalesRuleInterface
4242

4343
/**
4444
* List fields that only relate to coupon.
45-
*
45+
*
4646
* @var array
4747
*/
4848
protected $couponFields = [
@@ -218,7 +218,7 @@ protected function createCoupon($ruleId)
218218
'coupon' => array_filter([
219219
'rule_id' => $ruleId,
220220
'code' => $this->fixture->getCouponCode(),
221-
'type' => $this->data['coupon_type'],
221+
'type' => $this->mappingData['coupon_type'][$this->fixture->getCouponType()],
222222
'usage_limit' => isset($this->data['uses_per_coupon'])
223223
? $this->data['uses_per_coupon']
224224
: null,

0 commit comments

Comments
 (0)