X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/8d7febe482f92a34093127c60c6e2dda342b4223..refs/pull/3918/head:/tests/Uploads/AvatarTest.php diff --git a/tests/Uploads/AvatarTest.php b/tests/Uploads/AvatarTest.php index 650f5b4ea..eeaae09dc 100644 --- a/tests/Uploads/AvatarTest.php +++ b/tests/Uploads/AvatarTest.php @@ -82,6 +82,21 @@ class AvatarTest extends TestCase $this->createUserRequest($user); } + public function test_avatar_not_fetched_if_avatar_url_option_set_to_false() + { + config()->set([ + 'services.disable_services' => false, + 'services.avatar_url' => false, + ]); + + $user = User::factory()->make(); + + $http = $this->mock(HttpFetcher::class); + $http->shouldNotReceive('fetch'); + + $this->createUserRequest($user); + } + public function test_no_failure_but_error_logged_on_failed_avatar_fetch() { config()->set([