add test batches
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Tests\Unit\Services\AttendanceTracking;
|
||||
|
||||
use App\Models\AttendanceEmailTemplate;
|
||||
use App\Services\AttendanceTracking\AttendanceEmailComposerService;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -22,7 +21,7 @@ class AttendanceEmailComposerServiceTest extends TestCase
|
||||
'is_active' => 1,
|
||||
]);
|
||||
|
||||
$service = new AttendanceEmailComposerService(new AttendanceEmailTemplate);
|
||||
$service = new AttendanceEmailComposerService(new \App\Models\AttendanceEmailTemplate());
|
||||
$context = ['{{student_name}}' => 'Student A', '{{parent_name}}' => 'Parent A'];
|
||||
$rendered = $service->renderTemplate('ABS_1', 'default', $context);
|
||||
|
||||
@@ -32,7 +31,7 @@ class AttendanceEmailComposerServiceTest extends TestCase
|
||||
|
||||
public function test_pick_variant_fallback(): void
|
||||
{
|
||||
$service = new AttendanceEmailComposerService(new AttendanceEmailTemplate);
|
||||
$service = new AttendanceEmailComposerService(new \App\Models\AttendanceEmailTemplate());
|
||||
$this->assertSame('no_answer', $service->pickVariant('ABS_2'));
|
||||
$this->assertSame('default', $service->pickVariant('ABS_1'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user