File tree Expand file tree Collapse file tree
ProcessMaker/Http/Controllers/Process Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ private function getDefaultEmailNotification(): array
170170 $ screen = Screen::getScreenByKey ('default-email-task-notification ' );
171171
172172 return [
173- 'subject ' => 'RE: {{_user.firstname}} assigned you in "{{_task_name}}" ' ,
173+ 'subject ' => 'RE: " {{_user.firstname}}" assigned you in "{{_task_name}}" ' ,
174174 'type ' => 'screen ' ,
175175 'screenRef ' => $ screen ->id ,
176176 'toRecipients ' => [
Original file line number Diff line number Diff line change @@ -59,4 +59,23 @@ public function testInflightRouteWithViewPermission()
5959 $ response = $ this ->actingAs ($ user )->get ($ anotherRoute );
6060 $ response ->assertStatus (200 );
6161 }
62+
63+ public function testModelerShowExposesDefaultEmailNotificationWithQuotedUserFirstName ()
64+ {
65+ $ user = User::factory ()->admin ()->create ();
66+ $ process = Process::factory ()->create ();
67+
68+ $ route = route ('modeler.show ' , ['process ' => $ process ->id ]);
69+ $ response = $ this ->actingAs ($ user )->get ($ route );
70+
71+ $ response ->assertStatus (200 );
72+ $ response ->assertViewHas ('defaultEmailNotification ' );
73+
74+ $ defaultEmailNotification = $ response ->viewData ('defaultEmailNotification ' );
75+
76+ $ this ->assertSame (
77+ 'RE: "{{_user.firstname}}" assigned you in "{{_task_name}}" ' ,
78+ $ defaultEmailNotification ['subject ' ]
79+ );
80+ }
6281}
You can’t perform that action at this time.
0 commit comments