mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-11 14:23:31 +08:00
Removed tests for removed ajax tag route
This commit is contained in:
@ -30,48 +30,6 @@ class TagTest extends BrowserKitTest
|
|||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_get_page_tags()
|
|
||||||
{
|
|
||||||
$page = $this->getEntityWithTags(Page::class);
|
|
||||||
|
|
||||||
// Add some other tags to check they don't interfere
|
|
||||||
factory(Tag::class, $this->defaultTagCount)->create();
|
|
||||||
|
|
||||||
$this->asAdmin()->get("/ajax/tags/get/page/" . $page->id)
|
|
||||||
->shouldReturnJson();
|
|
||||||
|
|
||||||
$json = json_decode($this->response->getContent());
|
|
||||||
$this->assertTrue(count($json) === $this->defaultTagCount, "Returned JSON item count is not as expected");
|
|
||||||
}
|
|
||||||
|
|
||||||
public function test_get_chapter_tags()
|
|
||||||
{
|
|
||||||
$chapter = $this->getEntityWithTags(Chapter::class);
|
|
||||||
|
|
||||||
// Add some other tags to check they don't interfere
|
|
||||||
factory(Tag::class, $this->defaultTagCount)->create();
|
|
||||||
|
|
||||||
$this->asAdmin()->get("/ajax/tags/get/chapter/" . $chapter->id)
|
|
||||||
->shouldReturnJson();
|
|
||||||
|
|
||||||
$json = json_decode($this->response->getContent());
|
|
||||||
$this->assertTrue(count($json) === $this->defaultTagCount, "Returned JSON item count is not as expected");
|
|
||||||
}
|
|
||||||
|
|
||||||
public function test_get_book_tags()
|
|
||||||
{
|
|
||||||
$book = $this->getEntityWithTags(Book::class);
|
|
||||||
|
|
||||||
// Add some other tags to check they don't interfere
|
|
||||||
factory(Tag::class, $this->defaultTagCount)->create();
|
|
||||||
|
|
||||||
$this->asAdmin()->get("/ajax/tags/get/book/" . $book->id)
|
|
||||||
->shouldReturnJson();
|
|
||||||
|
|
||||||
$json = json_decode($this->response->getContent());
|
|
||||||
$this->assertTrue(count($json) === $this->defaultTagCount, "Returned JSON item count is not as expected");
|
|
||||||
}
|
|
||||||
|
|
||||||
public function test_tag_name_suggestions()
|
public function test_tag_name_suggestions()
|
||||||
{
|
{
|
||||||
// Create some tags with similar names to test with
|
// Create some tags with similar names to test with
|
||||||
|
Reference in New Issue
Block a user