mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
Added ability to archive projects and clients, fixes ST-37
This commit is contained in:
committed by
Gregor Vostrak
parent
f21a2d4bdd
commit
a69d1cb4c4
@@ -46,4 +46,30 @@ class ClientModelTest extends ModelTestAbstract
|
||||
$this->assertCount(4, $projectsRel);
|
||||
$this->assertTrue($projectsRel->first()->is($projects->first()));
|
||||
}
|
||||
|
||||
public function test_accessor_is_archived_is_true_if_archived_at_is_not_null(): void
|
||||
{
|
||||
// Arrange
|
||||
$client = Client::factory()->archived()->create();
|
||||
|
||||
// Act
|
||||
$client->refresh();
|
||||
$isArchived = $client->is_archived;
|
||||
|
||||
// Assert
|
||||
$this->assertTrue($isArchived);
|
||||
}
|
||||
|
||||
public function test_accessor_is_archived_is_false_if_archived_at_is_null(): void
|
||||
{
|
||||
// Arrange
|
||||
$client = Client::factory()->create();
|
||||
|
||||
// Act
|
||||
$client->refresh();
|
||||
$isArchived = $client->is_archived;
|
||||
|
||||
// Assert
|
||||
$this->assertFalse($isArchived);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user