Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
212
Issues
212
List
Boards
Labels
Service Desk
Milestones
Merge Requests
35
Merge Requests
35
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
6647d0a5
Commit
6647d0a5
authored
4 minutes ago
by
Ben Hayward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting
parent
0f42f32b
fix/onchain-limit-1924
1 merge request
!331
[Sprint/NuancedNumbat](fix): Allowing onchain boosts when offchain limit reached #1924
Pipeline
#82788802
running with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
ManagerSpec.php
Spec/Core/Boost/Network/ManagerSpec.php
+18
-17
No files found.
Spec/Core/Boost/Network/ManagerSpec.php
View file @
6647d0a5
...
...
@@ -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
);
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment