Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Korko
SecretSanta.fr
Commits
dd8e580c
Verified
Commit
dd8e580c
authored
Dec 04, 2020
by
Korko
Browse files
Remove Org Final Recap sending
parent
debbc52b
Pipeline
#369289
failed with stages
in 1 minute and 49 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/Services/DrawHandler.php
View file @
dd8e580c
...
...
@@ -6,7 +6,6 @@ use App\Models\Draw;
use
App\Exceptions\SolverException
;
use
App\Jobs\SendMail
;
use
App\Models\Mail
as
MailModel
;
use
App\Mail\OrganizerFinalRecap
;
use
App\Mail\OrganizerRecap
;
use
App\Mail\TargetDrawn
;
use
App\Models\Participant
;
...
...
@@ -49,7 +48,6 @@ class DrawHandler
}
$this
->
sendOrganizerEmail
(
$draw
);
$this
->
sendDelayedOrganizerEmail
(
$draw
);
foreach
(
$draw
->
participants
as
$participant
)
{
$this
->
sendParticipantEmail
(
$participant
);
}
...
...
@@ -117,12 +115,6 @@ class DrawHandler
SendMail
::
dispatch
(
$draw
->
organizer
,
new
OrganizerRecap
(
$draw
));
}
public
function
sendDelayedOrganizerEmail
(
Draw
$draw
)
{
SendMail
::
dispatch
(
$draw
->
organizer
,
new
OrganizerFinalRecap
(
$draw
))
->
delay
(
$draw
->
expires_at
->
addDay
());
}
public
function
sendParticipantEmail
(
Participant
$participant
)
{
Metrics
::
increment
(
'email'
);
...
...
tests/Unit/DrawHandlerTest.php
View file @
dd8e580c
...
...
@@ -4,7 +4,6 @@ namespace Tests\Unit;
use
App\Exceptions\SolverException
;
use
App\Jobs\SendMail
;
use
App\Mail\OrganizerFinalRecap
;
use
App\Mail\OrganizerRecap
;
use
App\Mail\TargetDrawn
;
use
App\Models\Draw
;
...
...
@@ -85,7 +84,6 @@ class DrawHandlerTest extends TestCase
$this
->
assertHasMailPushed
(
OrganizerRecap
::
class
,
'test@test.com'
,
function
(
$m
)
use
(
&
$link
)
{
$link
=
$m
->
panelLink
;
});
$this
->
assertHasMailPushed
(
OrganizerFinalRecap
::
class
,
'test@test.com'
);
// TODO: assert body
// Ensure Participants receive their own recap
...
...
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