1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Cleaned tests up, Started LDAP tests, Created LDAP wrapper

This commit is contained in:
Dan Brown
2016-01-15 23:21:47 +00:00
parent 14feef3679
commit 0821672e70
15 changed files with 259 additions and 79 deletions

View File

@@ -3,7 +3,7 @@
class PublicViewTest extends TestCase
{
public function testBooksViewable()
public function test_books_viewable()
{
$this->setSettings(['app-public' => 'true']);
$books = \BookStack\Book::orderBy('name', 'asc')->take(10)->get();
@@ -13,14 +13,14 @@ class PublicViewTest extends TestCase
$this->visit('/books')
->seeStatusCode(200)
->see($books[0]->name)
// Check indavidual book page is showing and it's child contents are visible.
// Check individual book page is showing and it's child contents are visible.
->click($bookToVisit->name)
->seePageIs($bookToVisit->getUrl())
->see($bookToVisit->name)
->see($bookToVisit->chapters()->first()->name);
}
public function testChaptersViewable()
public function test_chapters_viewable()
{
$this->setSettings(['app-public' => 'true']);
$chapterToVisit = \BookStack\Chapter::first();
@@ -30,7 +30,7 @@ class PublicViewTest extends TestCase
$this->visit($chapterToVisit->getUrl())
->seeStatusCode(200)
->see($chapterToVisit->name)
// Check indavidual chapter page is showing and it's child contents are visible.
// Check individual chapter page is showing and it's child contents are visible.
->see($pageToVisit->name)
->click($pageToVisit->name)
->see($chapterToVisit->book->name)