aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/Module/RpostTest.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-05-18 21:08:30 +0200
committerHarald Eilertsen <haraldei@anduin.net>2024-06-13 13:34:20 +0200
commit76a92ac2e1ed2d22ad960739e56e5832872cfe23 (patch)
tree7dcd07aafd3483d08757b7ba73b43bb69c7f6547 /tests/unit/Module/RpostTest.php
parent7c688de9cd9bfbccab60d77396f0f879acd4a52d (diff)
downloadvolse-hubzilla-76a92ac2e1ed2d22ad960739e56e5832872cfe23.tar.gz
volse-hubzilla-76a92ac2e1ed2d22ad960739e56e5832872cfe23.tar.bz2
volse-hubzilla-76a92ac2e1ed2d22ad960739e56e5832872cfe23.zip
tests: Module\Rpost shows login form if not authenticated.
Diffstat (limited to 'tests/unit/Module/RpostTest.php')
-rw-r--r--tests/unit/Module/RpostTest.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/Module/RpostTest.php b/tests/unit/Module/RpostTest.php
index 115894026..2f277e66d 100644
--- a/tests/unit/Module/RpostTest.php
+++ b/tests/unit/Module/RpostTest.php
@@ -32,4 +32,17 @@ class RpostTest extends \Zotlabs\Tests\Unit\Module\TestCase {
$this->assertPageContains('<form id="profile-jot-form"');
$this->assertPageContains('<input type="hidden" name="profile_uid" value="42"');
}
+
+ /**
+ * Display login form if session is not authenticated.
+ */
+ public function test_display_login_form_if_not_logged_in(): void {
+ $lc_mock = $this->getFunctionMock('Zotlabs\Module', 'local_channel')
+ ->expects($this->any())
+ ->willReturn(false);
+
+ $this->get('rpost');
+
+ $this->assertPageContains('<form action="https://hubzilla.test/rpost" id="main_login"');
+ }
}