mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Fix action_type from "created" to" create"
This commit is contained in:
parent
4aedbb52fa
commit
ae24b73b32
|
@ -52,7 +52,7 @@ class ReportTemplate extends Model
|
|||
'created_by' => auth()->id(),
|
||||
]);
|
||||
|
||||
$logAction->logaction('created');
|
||||
$logAction->logaction('create');
|
||||
});
|
||||
|
||||
static::updated(function (ReportTemplate $reportTemplate) {
|
||||
|
|
|
@ -15,7 +15,10 @@ class ReportTemplateActionLogTransformerTest extends TestCase
|
|||
{
|
||||
ReportTemplate::factory()->create();
|
||||
|
||||
$actionLogs = Actionlog::whereMorphedTo('item', ReportTemplate::class)->get();
|
||||
$actionLogs = Actionlog::query()
|
||||
->whereMorphedTo('item', ReportTemplate::class)
|
||||
->where('action_type', 'create')
|
||||
->get();
|
||||
|
||||
// should be created when ActionLog is created
|
||||
$this->assertCount(1, $actionLogs);
|
||||
|
|
|
@ -20,7 +20,7 @@ class ReportTemplateActivityLoggingTest extends TestCase
|
|||
|
||||
$this->assertDatabaseHas('action_logs', [
|
||||
'created_by' => $user->id,
|
||||
'action_type' => 'created',
|
||||
'action_type' => 'create',
|
||||
'target_id' => null,
|
||||
'target_type' => null,
|
||||
'item_type' => ReportTemplate::class,
|
||||
|
|
Loading…
Reference in a new issue