Skip to content

Commit 79dec33

Browse files
committed
update tests for workos. use real package
1 parent 0f52dbc commit 79dec33

11 files changed

+22
-380
lines changed

composer.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,12 @@
88
"framework"
99
],
1010
"license": "MIT",
11-
"repositories": [
12-
{
13-
"type": "path",
14-
"url": "./../laravel-workos"
15-
}
16-
],
1711
"require": {
1812
"php": "^8.2",
1913
"inertiajs/inertia-laravel": "^2.0",
2014
"laravel/framework": "^12.0",
2115
"laravel/tinker": "^2.10.1",
22-
"laravel/workos": "*",
16+
"laravel/workos": "^0.1.0",
2317
"tightenco/ziggy": "^2.4"
2418
},
2519
"require-dev": {

composer.lock

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

database/factories/UserFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function definition(): array
2121
'name' => fake()->name(),
2222
'email' => fake()->unique()->safeEmail(),
2323
'email_verified_at' => now(),
24-
'workos_id' => Str::random(10),
24+
'workos_id' => 'fake-'.Str::random(10),
2525
'remember_token' => Str::random(10),
2626
'avatar' => '',
2727
];

tests/Feature/Auth/AuthenticationTest.php

Lines changed: 0 additions & 54 deletions
This file was deleted.

tests/Feature/Auth/EmailVerificationTest.php

Lines changed: 0 additions & 58 deletions
This file was deleted.

tests/Feature/Auth/PasswordConfirmationTest.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

tests/Feature/Auth/PasswordResetTest.php

Lines changed: 0 additions & 73 deletions
This file was deleted.

tests/Feature/Auth/RegistrationTest.php

Lines changed: 0 additions & 31 deletions
This file was deleted.

tests/Feature/DashboardTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@ class DashboardTest extends TestCase
1212

1313
public function test_guests_are_redirected_to_the_login_page()
1414
{
15-
$response = $this->get('/dashboard');
16-
$response->assertRedirect('/login');
15+
$this->get('/dashboard')->assertRedirect('/login');
1716
}
1817

1918
public function test_authenticated_users_can_visit_the_dashboard()
2019
{
21-
$user = User::factory()->create();
22-
$this->actingAs($user);
20+
$this->actingAs($user = User::factory()->create());
2321

24-
$response = $this->get('/dashboard');
25-
$response->assertStatus(200);
22+
$this->get('/dashboard')->assertStatus(200);
2623
}
2724
}

0 commit comments

Comments
 (0)