]> git.mxchange.org Git - friendica.git/commitdiff
Fix dataset ids for otheruser/frienduser
authorHypolite Petovan <mrpetovan@gmail.com>
Wed, 4 Jul 2018 03:37:52 +0000 (23:37 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Wed, 4 Jul 2018 03:37:52 +0000 (23:37 -0400)
Remove debug

tests/ApiTest.php
tests/datasets/api.yml

index 81f77531de9611bd9481d8afdcfa2df92bb606ef..c7f3f8cd657076402d12f54fedc671b85b9fada9 100644 (file)
@@ -12,8 +12,6 @@ use Friendica\Network\BadRequestException;
 use Friendica\Network\HTTPException;
 use Friendica\Render\FriendicaSmarty;
 
-require_once 'include/dba.php';
-
 /**
  * Tests for the API functions.
  *
@@ -2731,7 +2729,7 @@ class ApiTest extends DatabaseTest
        public function testApiDirectMessagesNewWithUserId()
        {
                $_POST['text'] = 'message_text';
-               $_POST['user_id'] = $this->otherUser['id'];
+               $_POST['user_id'] = $this->friendUser['id'];
                $result = api_direct_messages_new('json');
                $this->assertEquals(['direct_message' => ['error' => -1]], $result);
        }
@@ -3395,8 +3393,6 @@ class ApiTest extends DatabaseTest
         */
        public function testApiGetNick()
        {
-               var_dump(\dba::inArray(\dba::select('contact')));
-
                $result = api_get_nick($this->otherUser['nurl']);
                $this->assertEquals('othercontact', $result);
        }
index eacb30a507fa740bf6ac2dbd4ede80bcc6ebab75..25c9dade60d24c30ff81e0092399517adf1938bd 100644 (file)
@@ -34,7 +34,7 @@ contact:
         network: dfrn
     -
         id: 43
-        uid: 42
+        uid: 0
         # Having the same name and nick allows us to test
         # the fallback to api_get_nick() in api_get_user()
         name: othercontact
@@ -48,7 +48,7 @@ contact:
         network: dfrn
     -
         id: 44
-        uid: 0
+        uid: 42
         name: Friend contact
         nick: friendcontact
         self: 0