add tests batch 20
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user