|
|
@@ -0,0 +1,42 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+
|
|
|
+namespace Tests\OrderIssues\Controllers;
|
|
|
+
|
|
|
+use App\User;
|
|
|
+use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
+use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
|
+
|
|
|
+use Tests\TestCase;
|
|
|
+
|
|
|
+class OrderIssueController_indexTest extends TestCase
|
|
|
+{
|
|
|
+ public $user;
|
|
|
+ public $response = null;
|
|
|
+
|
|
|
+ public function setUp(): void
|
|
|
+ {
|
|
|
+ parent::setUp();
|
|
|
+ $url = "http://bswas/order/issue/index";
|
|
|
+ $this->user = User::where('name','18887874545')->first();
|
|
|
+ $this->response = $this->actingAs($this->user)->get($url);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function testHasView(){
|
|
|
+ $this->response->assertViewIs('order.issue.index');
|
|
|
+ }
|
|
|
+
|
|
|
+ public function testHasOwners(){
|
|
|
+ $this->response->assertViewHas('owners');
|
|
|
+ }
|
|
|
+ public function testHasOrderIssues(){
|
|
|
+ $this->response->assertViewHas('orderIssues');
|
|
|
+ }
|
|
|
+
|
|
|
+ protected function tearDown(): void
|
|
|
+ {
|
|
|
+ parent::tearDown();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|