32 lines
781 B
PHP
32 lines
781 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Tests\Feature\Organization;
|
||
|
|
|
||
|
|
use CodeIgniter\Test\FeatureTestTrait;
|
||
|
|
use CodeIgniter\Test\CIUnitTestCase;
|
||
|
|
|
||
|
|
class CodingSysControllerTest extends CIUnitTestCase
|
||
|
|
{
|
||
|
|
use FeatureTestTrait;
|
||
|
|
|
||
|
|
protected $endpoint = 'api/organization/codingsys';
|
||
|
|
|
||
|
|
public function testIndexCodingSys()
|
||
|
|
{
|
||
|
|
$result = $this->get($this->endpoint);
|
||
|
|
$result->assertStatus(200);
|
||
|
|
}
|
||
|
|
|
||
|
|
public function testCreateCodingSys()
|
||
|
|
{
|
||
|
|
$payload = [
|
||
|
|
'CodingSysAbb' => 'ICD10',
|
||
|
|
'FullText' => 'International Classification of Diseases 10',
|
||
|
|
'Description' => 'Medical diagnosis coding system'
|
||
|
|
];
|
||
|
|
|
||
|
|
$result = $this->withBodyFormat('json')->post($this->endpoint, $payload);
|
||
|
|
$result->assertStatus(201);
|
||
|
|
}
|
||
|
|
}
|