fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
@@ -85,10 +85,10 @@ class AttendanceCommentTemplateApiTest extends TestCase
$mock->shouldReceive('create')
->once()
->with(Mockery::on(function ($data) use ($payload) {
return (int)$data['min_score'] === 80
&& (int)$data['max_score'] === 100
return (int) $data['min_score'] === 80
&& (int) $data['max_score'] === 100
&& $data['template_text'] === $payload['template_text']
&& (bool)$data['is_active'] === true;
&& (bool) $data['is_active'] === true;
}))
->andReturn([
'id' => 10,
@@ -159,7 +159,7 @@ class AttendanceCommentTemplateApiTest extends TestCase
->once()
->with(7, Mockery::on(function ($data) {
return $data['template_text'] === 'Updated comment text'
&& (bool)$data['is_active'] === false;
&& (bool) $data['is_active'] === false;
}))
->andReturn([
'id' => 7,
@@ -221,7 +221,7 @@ class AttendanceCommentTemplateApiTest extends TestCase
'max_score' => 49,
'template_text' => 'Low attendance',
'is_active' => true,
]
],
]);
$this->app->instance(AttendanceCommentTemplateService::class, $mock);
@@ -232,4 +232,4 @@ class AttendanceCommentTemplateApiTest extends TestCase
->assertJsonCount(1, 'templates')
->assertJsonPath('templates.0.id', 1);
}
}
}