Showing
4 changed files
with
13 additions
and
2 deletions
| ... | @@ -64,6 +64,10 @@ | ... | @@ -64,6 +64,10 @@ |
| 64 | "post-update-cmd": [ | 64 | "post-update-cmd": [ |
| 65 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", | 65 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", |
| 66 | "php artisan optimize" | 66 | "php artisan optimize" |
| 67 | + ], | ||
| 68 | + "refresh-test-database": [ | ||
| 69 | + "php artisan migrate:refresh --database=mysql_testing", | ||
| 70 | + "php artisan db:seed --class=DummyContentSeeder --database=mysql_testing" | ||
| 67 | ] | 71 | ] |
| 68 | }, | 72 | }, |
| 69 | "config": { | 73 | "config": { | ... | ... |
| ... | @@ -43,7 +43,8 @@ $factory->define(BookStack\Page::class, function ($faker) { | ... | @@ -43,7 +43,8 @@ $factory->define(BookStack\Page::class, function ($faker) { |
| 43 | 'name' => $faker->sentence, | 43 | 'name' => $faker->sentence, |
| 44 | 'slug' => str_random(10), | 44 | 'slug' => str_random(10), |
| 45 | 'html' => $html, | 45 | 'html' => $html, |
| 46 | - 'text' => strip_tags($html) | 46 | + 'text' => strip_tags($html), |
| 47 | + 'revision_count' => 1 | ||
| 47 | ]; | 48 | ]; |
| 48 | }); | 49 | }); |
| 49 | 50 | ... | ... |
| 1 | <div class="breadcrumbs"> | 1 | <div class="breadcrumbs"> |
| 2 | - @if (userCan('view', $book)) | 2 | + @if (userCan('view', $chapter->book)) |
| 3 | <a href="{{ $chapter->book->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $chapter->book->getShortName() }}</a> | 3 | <a href="{{ $chapter->book->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $chapter->book->getShortName() }}</a> |
| 4 | <span class="sep">»</span> | 4 | <span class="sep">»</span> |
| 5 | @endif | 5 | @endif | ... | ... |
| ... | @@ -22,6 +22,12 @@ abstract class BrowserKitTest extends TestCase | ... | @@ -22,6 +22,12 @@ abstract class BrowserKitTest extends TestCase |
| 22 | private $admin; | 22 | private $admin; |
| 23 | private $editor; | 23 | private $editor; |
| 24 | 24 | ||
| 25 | + public function tearDown() | ||
| 26 | + { | ||
| 27 | + \DB::disconnect('mysql_testing'); | ||
| 28 | + parent::tearDown(); | ||
| 29 | + } | ||
| 30 | + | ||
| 25 | /** | 31 | /** |
| 26 | * Creates the application. | 32 | * Creates the application. |
| 27 | * | 33 | * | ... | ... |
-
Please register or sign in to post a comment