Skip to content
Permalink
Browse files

Code style review

  • Loading branch information...
akoSalman committed Apr 11, 2019
1 parent fa619b4 commit 2793d24929060870f857d5dc509886d6ee2ebfb3
Showing with 6 additions and 4 deletions.
  1. +1 −1 src/Traits/LogsActivity.php
  2. +5 −3 tests/LogsActivityTest.php
@@ -59,7 +59,7 @@ public function shouldSubmitEmptyLogs(): bool
public function isLogEmpty($attrs): bool
{
return empty($attrs['attributes'] ?? []) && ! count($attrs['old'] ?? []);
return empty($attrs['attributes'] ?? []) && empty($attrs['old'] ?? []);
}
public function disableLogging()
@@ -341,13 +341,15 @@ public function it_will_not_submit_log_when_there_is_no_changes()
protected static $logOnlyDirty = true;
};
$entity = new $model();
$entity = new $model(['text' => 'test']);
$entity->save();
$this->assertCount(1, Activity::all());
$entity->name = 'my name';
$entity->save();
$activities = $entity->activities;
$this->assertCount(1, $activities);
$this->assertCount(1, Activity::all());
}
public function loginWithFakeUser()

0 comments on commit 2793d24

Please sign in to comment.
You can’t perform that action at this time.