Commit d14ac69a authored by Mark Harding's avatar Mark Harding

(chore): change boost existing check to include approved too

parent dffd0a4e
No related merge requests found
Pipeline #74532110 waiting for manual action with stages
in 8 minutes and 58 seconds
......@@ -149,10 +149,9 @@ class Manager
{
$existingBoost = $this->getList([
'useElastic' => true,
'state' => 'review',
'type' => $boost->getType(),
'entity_guid' => $boost->getEntityGuid(),
'limit' => 1
'limit' => 1,
]);
return $existingBoost->count() > 0;
......
......@@ -273,7 +273,7 @@ class ManagerSpec extends ObjectBehavior
{
$this->elasticRepository->getList([
'useElastic' => true,
'state' => 'review',
'state' => null,
'type' => 'newsfeed',
'entity_guid' => '123',
'limit' => 1,
......@@ -282,10 +282,6 @@ class ManagerSpec extends ObjectBehavior
->shouldBeCalled()
->willReturn(new Response([$boost], ''));
$this->repository->getList(Argument::any())
->shouldBeCalled()
->willReturn(new Response([$boost]));
$boost->getType()
->shouldBeCalled()
->willReturn('newsfeed');
......
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