refactoring (#116)

- refactoring architecture
- fix incomplete ssh logs
- code editor for scripts in the app
- remove Jobs and SSHCommands
This commit is contained in:
Saeed Vaziry
2024-03-14 20:03:43 +01:00
committed by GitHub
parent cee4a70c3c
commit 428140b931
472 changed files with 24110 additions and 8159 deletions

View File

@ -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,