Horodate précisément les contrôles de soins
This commit is contained in:
parent
81f259ea6e
commit
a0ea338292
10 changed files with 60 additions and 12 deletions
|
|
@ -360,6 +360,14 @@ try {
|
|||
$assert((int) $db->query('SELECT COUNT(*) FROM adoptions')->fetchColumn() === 1);
|
||||
$assert(!$db->query('PRAGMA foreign_key_check')->fetchAll());
|
||||
});
|
||||
$test('Les contrôles médicaux conservent leur date et leur heure', function () use ($assert): void {
|
||||
$view = file_get_contents(__DIR__ . '/../app/Views/_animal_show_modals.php');
|
||||
$controller = file_get_contents(__DIR__ . '/../app/Controllers/AnimalMedicalActions.php');
|
||||
$assert(str_contains($view, 'name="noted_date"'), 'Le champ de date du contrôle est absent');
|
||||
$assert(str_contains($view, 'name="noted_time"'), 'Le champ d’heure du contrôle est absent');
|
||||
$assert(str_contains($controller, "':noted_at' => \$observedAtSql"), 'La note ne reprend pas l’instant choisi');
|
||||
$assert(str_contains($controller, "':at' => \$observedAtSql"), 'La courbe de poids ne reprend pas l’instant choisi');
|
||||
});
|
||||
$test('La fiche annuaire agrège adoptions et dépenses', function () use ($db, $assert): void {
|
||||
$db->exec("INSERT INTO directory_contacts(kind,name) VALUES('organization','Structure test')");
|
||||
$contact = (int) $db->lastInsertId();
|
||||
|
|
|
|||
Loading…
Reference in a new issue