commit 81642ae7515613b330cee38e6a88356ed8c88258 Author: Joel Pittet Date: Wed Oct 21 23:29:50 2015 -0700 after diff --git a/commerce_discount.test b/commerce_discount.test index 4742bd2..14c60bb 100644 --- a/commerce_discount.test +++ b/commerce_discount.test @@ -629,7 +629,7 @@ class CommerceDiscountTest extends CommerceDiscountTestBase { * @link https://www.drupal.org/node/2468943 */ public function testCommerceDiscountRounding() { - $commerce_discount = $this->createDiscount('product_discount', 'percentage', 0.01); + $commerce_discount = $this->createDiscount('product_discount', 'percentage', 0.01, 'chintzy_bulk_discount'); $discount_wrapper = entity_metadata_wrapper('commerce_discount', $commerce_discount); $bulk_product = $this->createDummyProduct('BULK-PRODUCT', 'Bulk discount testing', 74); // Create the order and apply discount. @@ -637,11 +637,11 @@ class CommerceDiscountTest extends CommerceDiscountTestBase { $order_wrapper = commerce_cart_order_refresh($order); // Verify rounding came out properly. $price = $order_wrapper->commerce_line_items->get(0)->commerce_total->amount_decimal->value(); - $this->assertEqual($price, 3663, 'Rounding does not inflate discount amount'); + $this->assertEqual($price, 3700, 'Rounding does not inflate discount amount'); // For a $10.25 product with a 30% discount, this would produce as expected // a $3.08 discount with a line item unit price of $7.17. - $commerce_discount = $this->createDiscount('product_discount', 'percentage', 0.3); + $commerce_discount = $this->createDiscount('product_discount', 'percentage', 0.3, 'rotten_apple_discount'); $product = $this->createDummyProduct('BC-APPLES', 'B.C. Apples', 1025); // Create the order and apply discount. $order = $this->createDummyOrder($this->store_customer->uid, array($product->product_id => 1), 'completed');