mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
refactoring (#116)
- refactoring architecture - fix incomplete ssh logs - code editor for scripts in the app - remove Jobs and SSHCommands
This commit is contained in:
@ -4,23 +4,19 @@
|
||||
|
||||
use App\Models\Project;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use JsonException;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ProjectsTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
/**
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function test_create_project(): void
|
||||
{
|
||||
$this->actingAs($this->user);
|
||||
|
||||
$this->post(route('projects.create'), [
|
||||
'name' => 'test',
|
||||
])->assertSessionHasNoErrors();
|
||||
])->assertSessionDoesntHaveErrors();
|
||||
|
||||
$this->assertDatabaseHas('projects', [
|
||||
'name' => 'test',
|
||||
@ -39,9 +35,6 @@ public function test_see_projects_list(): void
|
||||
->assertSee($project->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function test_delete_project(): void
|
||||
{
|
||||
$this->actingAs($this->user);
|
||||
@ -51,16 +44,13 @@ public function test_delete_project(): void
|
||||
]);
|
||||
|
||||
$this->delete(route('projects.delete', $project))
|
||||
->assertSessionHasNoErrors();
|
||||
->assertSessionDoesntHaveErrors();
|
||||
|
||||
$this->assertDatabaseMissing('projects', [
|
||||
'id' => $project->id,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function test_edit_project(): void
|
||||
{
|
||||
$this->actingAs($this->user);
|
||||
@ -71,7 +61,7 @@ public function test_edit_project(): void
|
||||
|
||||
$this->post(route('projects.update', $project), [
|
||||
'name' => 'new-name',
|
||||
])->assertSessionHasNoErrors();
|
||||
])->assertSessionDoesntHaveErrors();
|
||||
|
||||
$this->assertDatabaseHas('projects', [
|
||||
'id' => $project->id,
|
||||
|
Reference in New Issue
Block a user