1
0
Fork 0
mirror of https://github.com/archtechx/laravel-seo.git synced 2025-12-12 09:54:03 +00:00

fix tests broken by #39

This commit is contained in:
Samuel Štancl 2024-11-23 00:45:49 +01:00
parent f4ec8c0fab
commit c768bb7d60
7 changed files with 26 additions and 26 deletions

View file

@ -86,7 +86,7 @@ test('setting the defaults returns the manager instance', function () {
test('meta tags can be added to the template', function () {
seo()->tag('fb:image', 'foo');
expect(meta())->toContain('<meta property="fb:image" content="foo" />');
expect(meta())->toContain('<meta property="fb:image" content="foo">');
});
test('raw tags can be added to the template', function () {
@ -114,8 +114,8 @@ test('canonical url can be read from request', function () {
seo()->withUrl();
expect(meta())
->toContain('<meta property="og:url" content="http://localhost" />')
->toContain('<link rel="canonical" href="http://localhost" />');
->toContain('<meta property="og:url" content="http://localhost">')
->toContain('<link rel="canonical" href="http://localhost">');
});
test('canonical url can be changed', function () {
@ -124,8 +124,8 @@ test('canonical url can be changed', function () {
seo()->url('http://foo.com/bar');
expect(meta())
->toContain('<meta property="og:url" content="http://foo.com/bar" />')
->toContain('<link rel="canonical" href="http://foo.com/bar" />');
->toContain('<meta property="og:url" content="http://foo.com/bar">')
->toContain('<link rel="canonical" href="http://foo.com/bar">');
});
test('og:title can be overridden using a tag', function () {
@ -134,16 +134,16 @@ test('og:title can be overridden using a tag', function () {
expect(meta())
->toContain('<title>foo</title>')
->toContain('<meta property="og:title" content="bar" />');
->toContain('<meta property="og:title" content="bar">');
});
test('type can be overridden using the type method', function () {
expect(meta())->toContain('<meta property="og:type" content="website" />'); // default
expect(meta())->toContain('<meta property="og:type" content="website">'); // default
seo()->type('foo');
expect(meta())
->toContain('<meta property="og:type" content="foo" />') // overridden
->toContain('<meta property="og:type" content="foo">') // overridden
->not()->toContain('website');
});
@ -155,5 +155,5 @@ test('og:locale is not included by default', function () {
test('og:locale can be added to the template', function () {
seo()->locale('de_DE');
expect(meta())->toContain('<meta property="og:locale" content="de_DE" />');
expect(meta())->toContain('<meta property="og:locale" content="de_DE">');
});