]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add a general PuSHed post and an @-reply back to a subscribee by name to OStatus...
authorBrion Vibber <brion@pobox.com>
Wed, 24 Mar 2010 01:44:54 +0000 (18:44 -0700)
committerBrion Vibber <brion@pobox.com>
Wed, 24 Mar 2010 01:44:54 +0000 (18:44 -0700)
plugins/OStatus/tests/remote-tests.php

index b064114911212580df7cece401e451c70e7d99b2..a27ecb854f50244cbf69547da28e5ac2f6145239 100644 (file)
@@ -78,6 +78,8 @@ class OStatusTester extends TestBase
         $this->testLocalPost();
         $this->testMentionUrl();
         $this->testSubscribe();
+        $this->testPush();
+        $this->testMentionSubscribee();
         $this->testUnsubscribe();
 
         $this->log("DONE!");
@@ -126,6 +128,26 @@ class OStatusTester extends TestBase
         $this->assertTrue($this->pub->hasSubscriber($this->sub->getProfileUri()));
     }
 
+    function testPush()
+    {
+        $this->assertTrue($this->sub->hasSubscription($this->pub->getProfileUri()));
+        $this->assertTrue($this->pub->hasSubscriber($this->sub->getProfileUri()));
+
+        $name = $this->sub->username;
+        $post = $this->pub->post("Regular post, which $name should get via PuSH");
+        $this->sub->assertReceived($post);
+    }
+
+    function testMentionSubscribee()
+    {
+        $this->assertTrue($this->sub->hasSubscription($this->pub->getProfileUri()));
+        $this->assertFalse($this->pub->hasSubscription($this->sub->getProfileUri()));
+
+        $name = $this->pub->username;
+        $post = $this->sub->post("Just a quick note back to my remote subscribee @$name");
+        $this->pub->assertReceived($post);
+    }
+
     function testUnsubscribe()
     {
         $this->assertTrue($this->sub->hasSubscription($this->pub->getProfileUri()));