mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-14 11:12:16 +01:00
Migrated endpoints from user to member; Renamed membership to member
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Tests\Unit\Endpoint\Api\V1;
|
||||
|
||||
use App\Enums\Role;
|
||||
use App\Models\OrganizationInvitation;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Laravel\Jetstream\Mail\TeamInvitation;
|
||||
@@ -50,7 +51,7 @@ class InvitationEndpointTest extends ApiEndpointTestAbstract
|
||||
// Act
|
||||
$response = $this->postJson(route('api.v1.invitations.store', $data->organization->getKey()), [
|
||||
'email' => 'test@mail.test',
|
||||
'role' => 'employee',
|
||||
'role' => Role::Employee->value,
|
||||
]);
|
||||
|
||||
// Assert
|
||||
@@ -68,7 +69,7 @@ class InvitationEndpointTest extends ApiEndpointTestAbstract
|
||||
// Act
|
||||
$response = $this->postJson(route('api.v1.invitations.store', $data->organization->getKey()), [
|
||||
'email' => 'test@asdf.at',
|
||||
'role' => 'employee',
|
||||
'role' => Role::Employee->value,
|
||||
]);
|
||||
|
||||
// Assert
|
||||
@@ -76,7 +77,7 @@ class InvitationEndpointTest extends ApiEndpointTestAbstract
|
||||
$invitation = OrganizationInvitation::first();
|
||||
$this->assertNotNull($invitation);
|
||||
$this->assertEquals('test@asdf.at', $invitation->email);
|
||||
$this->assertEquals('employee', $invitation->role);
|
||||
$this->assertEquals(Role::Employee->value, $invitation->role);
|
||||
}
|
||||
|
||||
public function test_resend_fails_if_user_has_no_permission_to_resend_the_invitation(): void
|
||||
|
||||
Reference in New Issue
Block a user