| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace Tests\OrderIssues\Controllers;
- use App\Owner;
- use App\User;
- use Tests\TestCase;
- class OrderIssueController_indexTest extends TestCase
- {
- public $user;
- protected $response = null;
- public function setUp(): void
- {
- parent::setUp();
- $url = "http://bswas/order/issue/index";
- $this->user = User::where('name', 'zengjun')->first();
- $this->response = $this->actingAs($this->user)->get($url);
- }
- public function testHasView()
- {
- $this->response->assertStatus(200);
- }
- public function testViewHasOwners(){
- $this->response->assertJson(['owners'=>Owner::all()]);
- }
- protected function tearDown(): void
- {
- parent::tearDown();
- }
- }
|