mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-12 18:22:16 +01:00
Make name fields in projects, tasks, clients and tags unique; fixes ST-265
This commit is contained in:
committed by
Gregor Vostrak
parent
313cee2db0
commit
512089ccbd
@@ -18,8 +18,7 @@ class UserTimeEntryEndpointTest extends ApiEndpointTestAbstract
|
||||
public function test_my_active_endpoint_returns_unauthorized_if_user_is_not_logged_in(): void
|
||||
{
|
||||
// Arrange
|
||||
$data = $this->createUserWithPermission([
|
||||
]);
|
||||
$data = $this->createUserWithPermission();
|
||||
|
||||
// Act
|
||||
$response = $this->getJson(route('api.v1.users.time-entries.my-active'));
|
||||
@@ -31,8 +30,7 @@ class UserTimeEntryEndpointTest extends ApiEndpointTestAbstract
|
||||
public function test_my_active_endpoint_returns_current_time_entry_of_logged_in_user(): void
|
||||
{
|
||||
// Arrange
|
||||
$data = $this->createUserWithPermission([
|
||||
]);
|
||||
$data = $this->createUserWithPermission();
|
||||
$activeTimeEntry = TimeEntry::factory()->forMember($data->member)->active()->create();
|
||||
$inactiveTimeEntry = TimeEntry::factory()->forMember($data->member)->create();
|
||||
Passport::actingAs($data->user);
|
||||
@@ -48,8 +46,7 @@ class UserTimeEntryEndpointTest extends ApiEndpointTestAbstract
|
||||
public function test_my_active_endpoint_logs_a_warning_if_user_has_multiple_active_time_entries_and_return_the_latest_one(): void
|
||||
{
|
||||
// Arrange
|
||||
$data = $this->createUserWithPermission([
|
||||
]);
|
||||
$data = $this->createUserWithPermission();
|
||||
$activeTimeEntry1 = TimeEntry::factory()->forMember($data->member)->active()->start(Carbon::now()->subDay())->create();
|
||||
$activeTimeEntry2 = TimeEntry::factory()->forMember($data->member)->active()->start(Carbon::now())->create();
|
||||
Passport::actingAs($data->user);
|
||||
@@ -69,8 +66,7 @@ class UserTimeEntryEndpointTest extends ApiEndpointTestAbstract
|
||||
public function test_my_active_endpoint_returns_not_found_if_user_has_no_active_time_entry(): void
|
||||
{
|
||||
// Arrange
|
||||
$data = $this->createUserWithPermission([
|
||||
]);
|
||||
$data = $this->createUserWithPermission();
|
||||
$inactiveTimeEntry = TimeEntry::factory()->forMember($data->member)->create();
|
||||
Passport::actingAs($data->user);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user