From 80d8ea5041c88d85364fb537e368426bb584c20d Mon Sep 17 00:00:00 2001 From: Dario Rekowski on RockPI Date: Tue, 22 Jun 2021 08:58:18 +0000 Subject: [PATCH] update test, fields change order --- .../Controller/AppRequestControllerTest.php | 86 +++++++++---------- 1 file changed, 41 insertions(+), 45 deletions(-) diff --git a/community_server/tests/TestCase/Controller/AppRequestControllerTest.php b/community_server/tests/TestCase/Controller/AppRequestControllerTest.php index bff10d997..190aa48b2 100644 --- a/community_server/tests/TestCase/Controller/AppRequestControllerTest.php +++ b/community_server/tests/TestCase/Controller/AppRequestControllerTest.php @@ -5,9 +5,9 @@ use Cake\TestSuite\IntegrationTestTrait; use Cake\TestSuite\TestCase; /** - * App\Controller\AppRequestsController Test Case + * App\Controller\TransactionJsonRequestHandlerController Test Case * - * @uses \App\Controller\AppRequestsController + * @uses \App\Controller\TransactionJsonRequestHandlerController */ class AppRequestControllerTest extends TestCase { @@ -109,11 +109,9 @@ class AppRequestControllerTest extends TestCase 'public_hex' => '8190bda585ee5f1d9fbf7d06e81e69ec18e13376104cff54b7457eb7d3ef710d' ] ]); - + $this->getAndParse('/api/get-balance/' . 1211, - ['state' => 'not found', 'msg' => 'invalid session', - 'details' => ['msg' => 'session not found', 'state' => 'not found'] - ] + ['state' => 'not found', 'msg' => 'invalid session'] ); } @@ -130,9 +128,7 @@ class AppRequestControllerTest extends TestCase ]); $this->getAndParse('/api/get-balance/' , - ['state' => 'not found', 'msg' => 'invalid session', - 'details' => ['msg' => 'session not found', 'state' => 'not found'] - ] + ['state' => 'not found', 'msg' => 'invalid session'] ); } @@ -162,81 +158,81 @@ class AppRequestControllerTest extends TestCase "state": "success", "transactions": [ { - "name": "Gradido Akademie", - "type": "creation", "transaction_id": 2, "date": "2021-04-12T00:00:00+00:00", + "memo": "AGE Januar 2021", + "name": "Gradido Akademie", + "type": "creation", "target_date": "2021-01-01T00:00:00+00:00", "creation_amount": 10000000, - "balance": 10000000, - "memo": "AGE Januar 2021" + "balance": 10000000 }, { - "name": "Samuel Schmied", - "email": "test3.yahoo.com", - "type": "send", "transaction_id": 3, "date": "2021-04-12T00:00:00+00:00", - "balance": 1000000, "memo": "test", - "pubkey": "e3369de3623ce8446d0424c4013e7a1d71a2671ae3d7bf1e798ebf0665d145f2" + "balance": 1000000, + "type": "send", + "pubkey": "e3369de3623ce8446d0424c4013e7a1d71a2671ae3d7bf1e798ebf0665d145f2", + "name": "Samuel Schmied", + "email": "test3.yahoo.com" }, { - "name": "Samuel Schmied", - "email": "test3.yahoo.com", - "type": "send", "transaction_id": 4, "date": "2021-04-14T00:00:00+00:00", - "balance": 100000, "memo": "test time", - "pubkey": "e3369de3623ce8446d0424c4013e7a1d71a2671ae3d7bf1e798ebf0665d145f2" + "balance": 100000, + "type": "send", + "pubkey": "e3369de3623ce8446d0424c4013e7a1d71a2671ae3d7bf1e798ebf0665d145f2", + "name": "Samuel Schmied", + "email": "test3.yahoo.com" }, { - "name": "Samuel Schmied", - "email": "test3.yahoo.com", - "type": "send", "transaction_id": 5, "date": "2021-04-14T09:01:07+00:00", - "balance": 100000, "memo": "test time", - "pubkey": "e3369de3623ce8446d0424c4013e7a1d71a2671ae3d7bf1e798ebf0665d145f2" + "balance": 100000, + "type": "send", + "pubkey": "e3369de3623ce8446d0424c4013e7a1d71a2671ae3d7bf1e798ebf0665d145f2", + "name": "Samuel Schmied", + "email": "test3.yahoo.com" }, { - "name": "Samuel Schmied", - "email": "test3.yahoo.com", - "type": "receive", "transaction_id": 6, "date": "2021-04-14T09:02:28+00:00", - "balance": 100000, "memo": "test time 3", - "pubkey": "0000000000000000000000000000000000000000000000000000000000000000" + "balance": 100000, + "type": "receive", + "pubkey": "0000000000000000000000000000000000000000000000000000000000000000", + "name": "Samuel Schmied", + "email": "test3.yahoo.com" }, { - "name": "Samuel Schmied", - "email": "test3.yahoo.com", - "type": "receive", "transaction_id": 7, "date": "2021-04-14T09:28:46+00:00", - "balance": 100000, "memo": "test login crash", - "pubkey": "0000000000000000000000000000000000000000000000000000000000000000" + "balance": 100000, + "type": "receive", + "pubkey": "0000000000000000000000000000000000000000000000000000000000000000", + "name": "Samuel Schmied", + "email": "test3.yahoo.com" }, { - "name": "Samuel Schmied", - "email": "test3.yahoo.com", - "type": "receive", "transaction_id": 8, "date": "2021-04-14T09:31:28+00:00", - "balance": 100000, "memo": "test login crash", - "pubkey": "0000000000000000000000000000000000000000000000000000000000000000" + "balance": 100000, + "type": "receive", + "pubkey": "0000000000000000000000000000000000000000000000000000000000000000", + "name": "Samuel Schmied", + "email": "test3.yahoo.com" } ], "transactionExecutingCount": 0, "count": 7, "gdtSum": 180000, - "timeUsed": 0.5575470924377441, - "decay_date": "2021-05-28T09:35:02+00:00", + "timeUsed": 0.7237420082092285, + "decay_date": "2021-06-22T08:54:43+00:00", "balance": 9100000, "decay": 9100000 }';