Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Oct 6, 2023
1 parent fd47dcf commit f095dfb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 36 deletions.
32 changes: 8 additions & 24 deletions tests/Http/Controllers/WorkbenchControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ protected function getPackageProviders($app)
];
}

/**
* @test
*/
/** @test */
public function it_can_get_current_user_information()
{
$user = UserFactory::new()->create();
Expand All @@ -78,9 +76,7 @@ public function it_can_get_current_user_information()
]);
}

/**
* @test
*/
/** @test */
public function it_can_get_current_user_information_without_authenticated_user_return_empty_array()
{
$user = UserFactory::new()->create();
Expand All @@ -91,9 +87,7 @@ public function it_can_get_current_user_information_without_authenticated_user_r
$response->assertOk()->assertExactJson([]);
}

/**
* @test
*/
/** @test */
public function it_can_authenticate_a_user()
{
$user = UserFactory::new()->create();
Expand All @@ -107,9 +101,7 @@ public function it_can_authenticate_a_user()
->assertAuthenticatedAs($user);
}

/**
* @test
*/
/** @test */
public function it_can_authenticate_a_user_using_email()
{
$user = UserFactory::new()->create();
Expand All @@ -123,9 +115,7 @@ public function it_can_authenticate_a_user_using_email()
->assertAuthenticatedAs($user);
}

/**
* @test
*/
/** @test */
public function it_can_deauthenticate_a_user()
{
$user = UserFactory::new()->create();
Expand All @@ -139,9 +129,7 @@ public function it_can_deauthenticate_a_user()
$this->assertGuest('web');
}

/**
* @test
*/
/** @test */
public function it_can_automatically_authenticate_a_user()
{
$user = UserFactory::new()->create();
Expand All @@ -158,9 +146,7 @@ public function it_can_automatically_authenticate_a_user()
->assertAuthenticatedAs($user);
}

/**
* @test
*/
/** @test */
public function it_can_automatically_authenticate_a_user_using_email()
{
$user = UserFactory::new()->create();
Expand All @@ -177,9 +163,7 @@ public function it_can_automatically_authenticate_a_user_using_email()
->assertAuthenticatedAs($user);
}

/**
* @test
*/
/** @test */
public function it_can_automatically_deauthenticate_a_user()
{
$user = UserFactory::new()->create();
Expand Down
16 changes: 4 additions & 12 deletions tests/Http/Middleware/CatchDefaultRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ protected function getPackageProviders($app)
];
}

/**
* @test
*/
/** @test */
public function it_would_redirect_to_workbench_path()
{
$user = UserFactory::new()->create();
Expand All @@ -75,9 +73,7 @@ public function it_would_redirect_to_workbench_path()
->assertRedirect('/_workbench');
}

/**
* @test
*/
/** @test */
public function it_would_show_default_page()
{
$this->instance(ConfigContract::class, new Config([
Expand All @@ -102,9 +98,7 @@ public function it_would_show_default_page()
->assertOk();
}

/**
* @test
*/
/** @test */
public function it_would_not_redirect_to_workbench_path_if_configuration_doesnt_requires_it()
{
$this->instance(ConfigContract::class, new Config([
Expand All @@ -129,9 +123,7 @@ public function it_would_not_redirect_to_workbench_path_if_configuration_doesnt_
->assertNotFound();
}

/**
* @test
*/
/** @test */
public function it_would_not_redirect_to_workbench_path_on_path_other_than_root()
{
$user = UserFactory::new()->create();
Expand Down

0 comments on commit f095dfb

Please sign in to comment.