mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 12:42:15 +01:00
Added billable rates; Added project members; Added visibility to projects
This commit is contained in:
@@ -39,6 +39,7 @@ class RegistrationTest extends TestCase
|
||||
|
||||
public function test_new_users_can_register(): void
|
||||
{
|
||||
// Act
|
||||
$response = $this->post('/register', [
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@example.com',
|
||||
@@ -47,6 +48,7 @@ class RegistrationTest extends TestCase
|
||||
'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature(),
|
||||
]);
|
||||
|
||||
// Assert
|
||||
$this->assertAuthenticated();
|
||||
$response->assertRedirect(RouteServiceProvider::HOME);
|
||||
$user = User::where('email', 'test@example.com')->firstOrFail();
|
||||
|
||||
@@ -14,13 +14,21 @@ class UpdateTeamNameTest extends TestCase
|
||||
|
||||
public function test_team_names_can_be_updated(): void
|
||||
{
|
||||
$this->actingAs($user = User::factory()->withPersonalOrganization()->create());
|
||||
// Arrange
|
||||
$user = User::factory()->withPersonalOrganization()->create();
|
||||
$this->actingAs($user);
|
||||
|
||||
// Act
|
||||
$response = $this->put('/teams/'.$user->currentTeam->id, [
|
||||
'name' => 'Test Organization',
|
||||
'currency' => 'USD',
|
||||
]);
|
||||
|
||||
// Assert
|
||||
$response->assertValid(errorBag: 'updateTeamName');
|
||||
$this->assertCount(1, $user->fresh()->ownedTeams);
|
||||
$this->assertEquals('Test Organization', $user->currentTeam->fresh()->name);
|
||||
$organization = $user->currentTeam->fresh();
|
||||
$this->assertEquals('Test Organization', $organization->name);
|
||||
$this->assertEquals('USD', $organization->currency);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user