Fixed chapter breadcrumbs and testing issues

This commit is contained in:
Dan Brown 2017-04-22 14:08:12 +01:00
parent a323b0d49c
commit 82e2c523e6
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
4 changed files with 13 additions and 2 deletions

View File

@ -64,6 +64,10 @@
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
],
"refresh-test-database": [
"php artisan migrate:refresh --database=mysql_testing",
"php artisan db:seed --class=DummyContentSeeder --database=mysql_testing"
]
},
"config": {

View File

@ -43,7 +43,8 @@ $factory->define(BookStack\Page::class, function ($faker) {
'name' => $faker->sentence,
'slug' => str_random(10),
'html' => $html,
'text' => strip_tags($html)
'text' => strip_tags($html),
'revision_count' => 1
];
});

View File

@ -1,5 +1,5 @@
<div class="breadcrumbs">
@if (userCan('view', $book))
@if (userCan('view', $chapter->book))
<a href="{{ $chapter->book->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $chapter->book->getShortName() }}</a>
<span class="sep">&raquo;</span>
@endif

View File

@ -22,6 +22,12 @@ abstract class BrowserKitTest extends TestCase
private $admin;
private $editor;
public function tearDown()
{
\DB::disconnect('mysql_testing');
parent::tearDown();
}
/**
* Creates the application.
*