fixed the issues that were pointed out except the pdf test

This commit is contained in:
Aqeeb Imtiaz Harun
2018-05-24 12:16:37 +08:00
parent 2bf4eb2b05
commit ba827bf27d
3 changed files with 13 additions and 26 deletions
+5 -6
View File
@@ -35,13 +35,12 @@ class CompanyTest extends TestCase
'country'=>'testing',
'contact_person'=>'testing',
]);
var_dump($response);
$response->assertStatus(302); //here 302 as the page redirects
$response->assertStatus(201);
}
public function testPUT()
{
$response = $this->json('PUT', '/api/company/9', [
$response = $this->json('PUT', '/api/company/2', [
'company_name'=>'changed testing',
'registration_no'=>'testing',
'tax_no'=>'testing',
@@ -61,7 +60,7 @@ class CompanyTest extends TestCase
{
Storage::fake('company_profile');
$response = $this->json('POST', '/api/company/company_profile/9', [
$response = $this->json('POST', '/api/company/company_profile/2', [
'company_profile' => UploadedFile::fake()->image('comp.jpg')
]);
dd($response->getContent());
@@ -72,8 +71,8 @@ class CompanyTest extends TestCase
{
Storage::fake('reg_cert');
$response = $this->json('POST', '/api/company/reg_cert/9', [
'reg_cert' => UploadedFile::fake()->image('reg.pdf')
$response = $this->json('POST', '/api/company/reg_cert/2', [
'reg_cert' => UploadedFile::fake()->create('document.pdf')//, $sizeInKilobytes)
]);
dd($response->getContent());
$response->assertStatus(200);