diff --git a/routes/api.php b/routes/api.php index b88743d8309c..58b2e6dbec0f 100644 --- a/routes/api.php +++ b/routes/api.php @@ -112,7 +112,7 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a Route::post('templates', 'TemplateController@show')->name('templates.show'); - Route::post('preview', 'PreviewController@show'); + Route::post('preview', 'PreviewController@show')->name('preview.show'); Route::post('self-update', 'SelfUpdateController@update')->middleware('password_protected'); diff --git a/tests/Feature/PreviewTest.php b/tests/Feature/PreviewTest.php deleted file mode 100644 index 2b608c0b134d..000000000000 --- a/tests/Feature/PreviewTest.php +++ /dev/null @@ -1,89 +0,0 @@ -makeTestData(); - - Session::start(); - - $this->faker = \Faker\Factory::create(); - - Model::reguard(); - - - if (config('ninja.testvars.travis') !== false) { - $this->markTestSkipped('Skip test for CI Testing'); - } - - } - - - 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); - } -}