Created
September 13, 2024 05:44
-
-
Save rizkytegar/0e4e2efa5321a10105923745c1530bf3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\Feature; | |
use Tests\TestCase; | |
use Illuminate\Http\Response; | |
use Illuminate\Support\Facades\DB; | |
class KategoriAsetControllerTest extends TestCase | |
{ | |
public function test_tambah_kategori_aset() | |
{ | |
$response = $this->withHeaders([ | |
'X-CSRF-TOKEN' => csrf_token(), | |
])->post(route('kategoriaset.save'), [ | |
'kode_kategori' => '001', | |
'nama_kategori' => '001', | |
'deskripsi' => '001', | |
]); | |
$response->assertStatus(302); | |
} | |
public function test_update_kategori_aset() | |
{ | |
$response = $this->withHeaders([ | |
'X-CSRF-TOKEN' => csrf_token(), | |
])->post(route('kategoriaset.update'), [ | |
'kode_kategori' => '001', | |
'nama_kategori' => '002', | |
'deskripsi' => '002', | |
]); | |
$response->assertStatus(302); | |
} | |
public function test_delete_kategori_aset() | |
{ | |
$response = $this->withHeaders([ | |
'X-CSRF-TOKEN' => csrf_token(), | |
])->delete(route('kategoriaset.delete'), [ | |
'kode_kategori' => '001' | |
]); | |
$response->assertStatus(302); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment