From 3a89ab199be96bf451257c619986c80f11b8742c Mon Sep 17 00:00:00 2001
From: Hypolite Petovan <mrpetovan@gmail.com>
Date: Wed, 4 Jul 2018 00:09:17 -0400
Subject: [PATCH] Fix tests error/failures

- Fix undenifed index: author-network notice
- Fix assertion mismatch in testApiDirectMessagesNewWithUserId
---
 tests/ApiTest.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/ApiTest.php b/tests/ApiTest.php
index c7f3f8cd65..1a94b0d46a 100644
--- a/tests/ApiTest.php
+++ b/tests/ApiTest.php
@@ -2338,6 +2338,7 @@ class ApiTest extends DatabaseTest
 				'body' => '',
 				'verb' => '',
 				'author-id' => 42,
+				'author-network' => \Friendica\Core\Protocol::DFRN,
 				'plink' => '',
 			]
 		];
@@ -2359,6 +2360,7 @@ class ApiTest extends DatabaseTest
 				'body' => '',
 				'verb' => '',
 				'author-id' => 42,
+				'author-network' => \Friendica\Core\Protocol::DFRN,
 				'plink' => '',
 			]
 		];
@@ -2729,7 +2731,7 @@ class ApiTest extends DatabaseTest
 	public function testApiDirectMessagesNewWithUserId()
 	{
 		$_POST['text'] = 'message_text';
-		$_POST['user_id'] = $this->friendUser['id'];
+		$_POST['user_id'] = $this->otherUser['id'];
 		$result = api_direct_messages_new('json');
 		$this->assertEquals(['direct_message' => ['error' => -1]], $result);
 	}