mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
@@ -66,7 +66,7 @@ class WatchTest extends TestCase
|
||||
|
||||
$this->actingAs($editor)->get($book->getUrl());
|
||||
$resp = $this->put('/watching/update', [
|
||||
'type' => get_class($book),
|
||||
'type' => $book->getMorphClass(),
|
||||
'id' => $book->id,
|
||||
'level' => 'comments'
|
||||
]);
|
||||
@@ -81,7 +81,7 @@ class WatchTest extends TestCase
|
||||
]);
|
||||
|
||||
$resp = $this->put('/watching/update', [
|
||||
'type' => get_class($book),
|
||||
'type' => $book->getMorphClass(),
|
||||
'id' => $book->id,
|
||||
'level' => 'default'
|
||||
]);
|
||||
@@ -101,7 +101,7 @@ class WatchTest extends TestCase
|
||||
$book = $this->entities->book();
|
||||
|
||||
$resp = $this->put('/watching/update', [
|
||||
'type' => get_class($book),
|
||||
'type' => $book->getMorphClass(),
|
||||
'id' => $book->id,
|
||||
'level' => 'comments'
|
||||
]);
|
||||
|
@@ -14,10 +14,10 @@ class FavouriteTest extends TestCase
|
||||
|
||||
$resp = $this->actingAs($editor)->get($page->getUrl());
|
||||
$this->withHtml($resp)->assertElementContains('button', 'Favourite');
|
||||
$this->withHtml($resp)->assertElementExists('form[method="POST"][action$="/favourites/add"]');
|
||||
$this->withHtml($resp)->assertElementExists('form[method="POST"][action$="/favourites/add"] input[name="type"][value="page"]');
|
||||
|
||||
$resp = $this->post('/favourites/add', [
|
||||
'type' => get_class($page),
|
||||
'type' => $page->getMorphClass(),
|
||||
'id' => $page->id,
|
||||
]);
|
||||
$resp->assertRedirect($page->getUrl());
|
||||
@@ -45,7 +45,7 @@ class FavouriteTest extends TestCase
|
||||
$this->withHtml($resp)->assertElementExists('form[method="POST"][action$="/favourites/remove"]');
|
||||
|
||||
$resp = $this->post('/favourites/remove', [
|
||||
'type' => get_class($page),
|
||||
'type' => $page->getMorphClass(),
|
||||
'id' => $page->id,
|
||||
]);
|
||||
$resp->assertRedirect($page->getUrl());
|
||||
@@ -67,7 +67,7 @@ class FavouriteTest extends TestCase
|
||||
|
||||
$this->actingAs($user)->get($book->getUrl());
|
||||
$resp = $this->post('/favourites/add', [
|
||||
'type' => get_class($book),
|
||||
'type' => $book->getMorphClass(),
|
||||
'id' => $book->id,
|
||||
]);
|
||||
$resp->assertRedirect($book->getUrl());
|
||||
|
Reference in New Issue
Block a user