Skip to content

Commit

Permalink
[IMP] sale_promotion_discount_in_field: tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Volodiay616 committed Aug 19, 2023
1 parent 1f83955 commit 2b32aa0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions sale_promotion_discount_in_field/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"version": "14.0.1.0.1",
"summary": "Put promotion discount into discount field",
"author": "Ooops, Cetmix, Odoo Community Association (OCA)",
"maintainer": "Cetmix",
"license": "AGPL-3",
"category": "Sales Management",
"website": "https://github.com/OCA/sale-promotion",
Expand Down
1 change: 1 addition & 0 deletions sale_promotion_discount_in_field/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"This module should be renamed sale_coupon_discount_in_field in future migrations for naming consistency."
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def test_program_reward_discount_line_with_applicability(self):
}
)

# Test when error_status is empty (coupon is correct and exists).
error_status = program._check_promo_code(self.order, coupon_code)
self.assertFalse(error_status)

Expand All @@ -297,15 +298,16 @@ def test_program_reward_discount_line_with_applicability(self):
)

# Apply the program
self._apply_coupon(self.order, coupon_code)
result = self._apply_coupon(self.order, coupon_code)
# self._apply_coupon(self.order, coupon_code)
self.assertEqual(
self.order.code_promo_program_id,
program,
msg="program must be added to order",
)

self.assertEqual(
self.order.amount_total,
2475.0,
"The order total with programs should be 2475.00",
)
self.assertEqual(result, {})

0 comments on commit 2b32aa0

Please sign in to comment.