This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/autocomplete/test.php

18 lines
463 B
PHP
Raw Normal View History

<?php
2021-12-14 18:32:47 +00:00
declare(strict_types=1);
namespace Shimmie2;
2020-01-29 00:49:21 +00:00
class AutoCompleteTest extends ShimmiePHPUnitTestCase
{
public function testAuth()
{
2020-01-29 20:22:50 +00:00
send_event(new UserLoginEvent(User::by_name(self::$anon_name)));
$page = $this->get_page('api/internal/autocomplete', ["s"=>"not-a-tag"]);
$this->assertEquals(200, $page->code);
$this->assertEquals(PageMode::DATA, $page->mode);
$this->assertEquals("[]", $page->data);
}
}