Fixes for tests - changed listResponse to itemResponse

This commit is contained in:
David Bomba 2021-03-10 09:23:13 +11:00
parent 3c162d92de
commit 90b3b25849
2 changed files with 14 additions and 3 deletions

View File

@ -405,6 +405,6 @@ class BillingSubscriptionController extends BaseController
{ {
$this->billing_subscription_repo->delete($billing_subscription); $this->billing_subscription_repo->delete($billing_subscription);
return $this->listResponse($billing_subscription->fresh()); return $this->itemResponse($billing_subscription->fresh());
} }
} }

View File

@ -1,4 +1,13 @@
<?php <?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace Tests\Feature; namespace Tests\Feature;
@ -13,6 +22,10 @@ use Illuminate\Support\Facades\Session;
use Tests\MockAccountData; use Tests\MockAccountData;
use Tests\TestCase; use Tests\TestCase;
/**
* @test
* @covers App\Http\Controllers\BillingSubscriptionController
*/
class BillingSubscriptionApiTest extends TestCase class BillingSubscriptionApiTest extends TestCase
{ {
use MakesHash; use MakesHash;
@ -100,7 +113,6 @@ class BillingSubscriptionApiTest extends TestCase
*/ */
public function testBillingSubscriptionDeleted() public function testBillingSubscriptionDeleted()
{ {
$this->markTestSkipped();
$product = Product::factory()->create([ $product = Product::factory()->create([
'company_id' => $this->company->id, 'company_id' => $this->company->id,
@ -118,6 +130,5 @@ class BillingSubscriptionApiTest extends TestCase
->assertStatus(200) ->assertStatus(200)
->json(); ->json();
dd($response);
} }
} }