Skip to content

Commit

Permalink
Fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Feb 12, 2021
1 parent c3f8030 commit b3e8a5f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function it_updates_property_when_price_has_changed(
$event = new PreUpdateEventArgs($channelPricing->getWrappedObject(), $entityManager->getWrappedObject(), $changeSet);

$channelPricing->hasDiscount()->willReturn(true);
$channelPricing->resetBulkIdentifier()->shouldBeCalled();
$channelPricing->setManuallyDiscounted(true)->shouldBeCalled();

$this->preUpdate($event);
Expand All @@ -46,6 +47,7 @@ public function it_updates_property_when_original_price_has_changed(
$event = new PreUpdateEventArgs($channelPricing->getWrappedObject(), $entityManager->getWrappedObject(), $changeSet);

$channelPricing->hasDiscount()->willReturn(true);
$channelPricing->resetBulkIdentifier()->shouldBeCalled();
$channelPricing->setManuallyDiscounted(true)->shouldBeCalled();

$this->preUpdate($event);
Expand All @@ -59,6 +61,7 @@ public function it_sets_property_to_false_when_prices_are_equal_although_propert
$event = new PreUpdateEventArgs($channelPricing->getWrappedObject(), $entityManager->getWrappedObject(), $changeSet);

$channelPricing->hasDiscount()->willReturn(false);
$channelPricing->resetBulkIdentifier()->shouldBeCalled();
$channelPricing->setManuallyDiscounted(false)->shouldBeCalled();

$this->preUpdate($event);
Expand All @@ -83,6 +86,7 @@ public function it_sets_property_to_false_when_prices_are_equal(
$event = new LifecycleEventArgs($channelPricing->getWrappedObject(), $entityManager->getWrappedObject());

$channelPricing->hasDiscount()->willReturn(false);
$channelPricing->resetBulkIdentifier()->shouldBeCalled();
$channelPricing->setManuallyDiscounted(false)->shouldBeCalled();

$this->prePersist($event);
Expand All @@ -95,6 +99,7 @@ public function it_sets_property_to_true_when_prices_are_not_equal(
$event = new LifecycleEventArgs($channelPricing->getWrappedObject(), $entityManager->getWrappedObject());

$channelPricing->hasDiscount()->willReturn(true);
$channelPricing->resetBulkIdentifier()->shouldBeCalled();
$channelPricing->setManuallyDiscounted(true)->shouldBeCalled();

$this->prePersist($event);
Expand Down

0 comments on commit b3e8a5f

Please sign in to comment.