diff --git a/tests/Pest/FaviconTest.php b/tests/Pest/FaviconTest.php index 2c9ca40..98e23e2 100644 --- a/tests/Pest/FaviconTest.php +++ b/tests/Pest/FaviconTest.php @@ -41,3 +41,28 @@ test('it should fail because the from path is incorrect', function () { assertFileDoesNotExist(public_path('favicon.ico')); assertFileDoesNotExist(public_path('favicon.png')); }); + +test('it should have custom value with non-empty string', function () { + seo()->favicon('foo'); + + expect(seo('favicon'))->toBe('foo'); + expect(meta())->toContain(''); +}); + +test('it should not have custom value with empty string or false', function () { + seo()->favicon(''); + + expect(seo('favicon'))->toBe(null); + expect(meta())->not()->toContain('link rel="icon"'); + + expect(seo('favicon'))->toBe(null); + expect(meta())->not()->toContain('link rel="icon"'); +}); + +test('it should have default favicon setup', function () { + seo()->favicon(); + expect(seo('favicon'))->toBe(null); + + expect(meta())->toContain(''); + expect(meta())->toContain(''); +}); \ No newline at end of file