Commit 6647d0a5 authored by Ben Hayward's avatar Ben Hayward

Formatting

1 merge request!331[Sprint/NuancedNumbat](fix): Allowing onchain boosts when offchain limit reached #1924
Pipeline #82788802 canceled with stages
in 6 minutes and 21 seconds
......@@ -370,6 +370,24 @@ class ManagerSpec extends ObjectBehavior
$this->isBoostLimitExceededBy($boost)->shouldReturn(true);
}
public function it_should_allow_a_user_to_boost_onchain(Boost $boost)
{
$boostArray = [];
for ($i = 0; $i < 2; $i++) {
$newBoost = new Boost();
$newBoost->setCreatedTimestamp('9999999999999999');
$newBoost->setImpressions(5001);
array_push($boostArray, $newBoost);
}
$boost->isOnChain()
->shouldBeCalled()
->willReturn(true);
Di::_()->get('Config')->set('max_daily_boost_views', 10000);
$this->isBoostLimitExceededBy($boost)->shouldReturn(false);
}
public function runThroughGetList($boost, $existingBoosts, $onchain = false)
{
$this->elasticRepository->getList([
......@@ -405,21 +423,4 @@ class ManagerSpec extends ObjectBehavior
->shouldBeCalled()
->willReturn(1000);
}
public function it_should_allow_a_user_to_boost_onchain(Boost $boost)
{
$boostArray = [];
for ($i = 0; $i < 2; $i++) {
$newBoost = new Boost();
$newBoost->setCreatedTimestamp('9999999999999999');
$newBoost->setImpressions(5001);
array_push($boostArray, $newBoost);
}
$boost->isOnChain()
->shouldBeCalled()
->willReturn(true);
Di::_()->get('Config')->set('max_daily_boost_views', 10000);
$this->isBoostLimitExceededBy($boost)->shouldReturn(false);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment