diff --git a/server/tests/endpoints/BillsTest.php b/server/tests/endpoints/BillsTest.php index 0de1a2e54..010dde523 100644 --- a/server/tests/endpoints/BillsTest.php +++ b/server/tests/endpoints/BillsTest.php @@ -1,9 +1,6 @@ client->post('/api/events/2/bill'); $this->assertStatusCode(SUCCESS_CREATED); - $newBillNumber = sprintf('%s-00002', date('Y')); + $newBillNumber = sprintf('%s-00001', date('Y')); $this->assertResponseData([ 'id' => 2, 'number' => $newBillNumber, @@ -114,7 +111,7 @@ public function testCreateBillWithDiscount() { $this->client->post('/api/events/2/bill', ['discountRate' => 50.0]); $this->assertStatusCode(SUCCESS_CREATED); - $newBillNumber = sprintf('%s-00002', date('Y')); + $newBillNumber = sprintf('%s-00001', date('Y')); $this->assertResponseData([ 'id' => 2, 'number' => $newBillNumber, diff --git a/server/tests/models/BillTest.php b/server/tests/models/BillTest.php index f0125e9cf..e2d4f1eb0 100644 --- a/server/tests/models/BillTest.php +++ b/server/tests/models/BillTest.php @@ -5,8 +5,6 @@ use Robert2\API\Models; use Robert2\API\Errors; -use Robert2\API\I18n\I18n; -use Robert2\API\Config\Config; final class BillTest extends ModelTestCase { @@ -159,7 +157,7 @@ public function testCreateFromEventNotFound() public function testCreateFromEvent() { $result = $this->model->createFromEvent(2, 1, 25.9542); - $newBillNumber = sprintf('%s-00002', date('Y')); + $newBillNumber = sprintf('%s-00001', date('Y')); $expected = [ 'id' => 2, 'number' => $newBillNumber, @@ -231,6 +229,6 @@ public function testDeleteByNumber() public function testGetLastBillNumber() { $result = $this->model->getLastBillNumber(); - $this->assertEquals(1, $result); + $this->assertEquals(0, $result); } }