X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/6edf2c155dd24c4876fc15481ffd74bf3b2e4d05..refs/pull/5721/head:/tests/Settings/RegenerateReferencesTest.php diff --git a/tests/Settings/RegenerateReferencesTest.php b/tests/Settings/RegenerateReferencesTest.php index 0f3122074..0511f2624 100644 --- a/tests/Settings/RegenerateReferencesTest.php +++ b/tests/Settings/RegenerateReferencesTest.php @@ -2,7 +2,7 @@ namespace Tests\Settings; -use BookStack\Actions\ActivityType; +use BookStack\Activity\ActivityType; use BookStack\References\ReferenceStore; use Tests\TestCase; @@ -21,7 +21,7 @@ class RegenerateReferencesTest extends TestCase public function test_action_runs_reference_regen() { $this->mock(ReferenceStore::class) - ->shouldReceive('updateForAllPages') + ->shouldReceive('updateForAll') ->once(); $resp = $this->asAdmin()->post('/settings/maintenance/regenerate-references'); @@ -32,11 +32,11 @@ class RegenerateReferencesTest extends TestCase public function test_settings_manage_permission_required() { - $editor = $this->getEditor(); + $editor = $this->users->editor(); $resp = $this->actingAs($editor)->post('/settings/maintenance/regenerate-references'); $this->assertPermissionError($resp); - $this->giveUserPermissions($editor, ['settings-manage']); + $this->permissions->grantUserRolePermissions($editor, ['settings-manage']); $resp = $this->actingAs($editor)->post('/settings/maintenance/regenerate-references'); $this->assertNotPermissionError($resp); @@ -45,7 +45,7 @@ class RegenerateReferencesTest extends TestCase public function test_action_failed_shown_as_error_notification() { $this->mock(ReferenceStore::class) - ->shouldReceive('updateForAllPages') + ->shouldReceive('updateForAll') ->andThrow(\Exception::class, 'A badger stopped the task'); $resp = $this->asAdmin()->post('/settings/maintenance/regenerate-references');