summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2021-10-18 18:19:37 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2021-10-20 11:53:45 +0200
commit873e8e219cb7d9c0651260a3b4f138618a22f31e (patch)
treeda2ffc73b5c6f9255d60f84eb2cbe73a7cdefc60 /tests
parent3ce3c0f117e7f5b02e55eb2c9aa0a1e7f7fe3508 (diff)
downloadnextcloud-server-873e8e219cb7d9c0651260a3b4f138618a22f31e.tar.gz
nextcloud-server-873e8e219cb7d9c0651260a3b4f138618a22f31e.zip
Add appName to contactsmenu action API
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Contacts/ContactsMenu/Actions/LinkActionTest.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lib/Contacts/ContactsMenu/Actions/LinkActionTest.php b/tests/lib/Contacts/ContactsMenu/Actions/LinkActionTest.php
index ed6e9ace403..a2530084442 100644
--- a/tests/lib/Contacts/ContactsMenu/Actions/LinkActionTest.php
+++ b/tests/lib/Contacts/ContactsMenu/Actions/LinkActionTest.php
@@ -75,10 +75,29 @@ class LinkActionTest extends TestCase {
$this->action->setName('Nickie Works');
$this->action->setPriority(33);
$this->action->setHref('example.com');
+ $this->action->setAppName('contacts');
$expected = [
'title' => 'Nickie Works',
'icon' => 'icon-contacts',
'hyperlink' => 'example.com',
+ 'appName' => 'contacts',
+ ];
+
+ $json = $this->action->jsonSerialize();
+
+ $this->assertEquals($expected, $json);
+ }
+
+ public function testJsonSerializeNoAppName() {
+ $this->action->setIcon('icon-contacts');
+ $this->action->setName('Nickie Works');
+ $this->action->setPriority(33);
+ $this->action->setHref('example.com');
+ $expected = [
+ 'title' => 'Nickie Works',
+ 'icon' => 'icon-contacts',
+ 'hyperlink' => 'example.com',
+ 'appName' => '',
];
$json = $this->action->jsonSerialize();