makeTestData(); Session::start(); $this->faker = \Faker\Factory::create(); Model::reguard(); } public function testPreviewDesign() { $design = Design::find(3); $data = [ 'entity' => 'invoice', 'entity_id' => $this->invoice->hashed_id, 'design' => $design, ]; $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-TOKEN' => $this->token ])->post('/api/v1/preview', $data)->assertStatus(200); } public function testBlankEntityPreviewDesign() { $design = Design::find(3); $data = [ 'design' => $design, ]; $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-TOKEN' => $this->token ])->post('/api/v1/preview', $data); $response->assertStatus(200); } }