mirror of
https://github.com/archtechx/laravel-seo.git
synced 2025-12-12 09:54:03 +00:00
add required previewify prefix
This commit is contained in:
parent
cf8ec8d3ae
commit
100fcbea5d
3 changed files with 15 additions and 7 deletions
|
|
@ -20,14 +20,14 @@ test('previewify templates can be given data', function () {
|
|||
seo()->previewify('blog', 1);
|
||||
expect(seo()->previewify('blog', ['title' => 'abc', 'excerpt' => 'def']))
|
||||
->toContain('previewify.app/generate/templates/1')
|
||||
->toContain(base64_encode(json_encode(['title' => 'abc', 'excerpt' => 'def'])));
|
||||
->toContain(base64_encode(json_encode(['previewify:title' => 'abc', 'previewify:excerpt' => 'def'])));
|
||||
});
|
||||
|
||||
test('the previewify method returns a link to a signed url', function () {
|
||||
seo()->previewify('blog', 1);
|
||||
|
||||
expect(seo()->previewify('blog', ['title' => 'abc']))
|
||||
->toContain('?signature=' . hash_hmac('sha256', base64_encode(json_encode(['title' => 'abc'])), config('services.previewify.key')));
|
||||
->toContain('?signature=' . hash_hmac('sha256', base64_encode(json_encode(['previewify:title' => 'abc'])), config('services.previewify.key')));
|
||||
});
|
||||
|
||||
test("previewify templates use default data when they're not passed any data explicitly", function () {
|
||||
|
|
@ -37,7 +37,7 @@ test("previewify templates use default data when they're not passed any data exp
|
|||
|
||||
expect(seo()->previewify('blog'))
|
||||
->toContain('previewify.app/generate/templates/1')
|
||||
->toContain(base64_encode(json_encode(['title' => 'foo', 'description' => 'bar'])));
|
||||
->toContain(base64_encode(json_encode(['previewify:title' => 'foo', 'previewify:description' => 'bar'])));
|
||||
});
|
||||
|
||||
test('previewify images are used as the cover images', function () {
|
||||
|
|
@ -66,7 +66,7 @@ test('previewify uses the raw title and description', function () {
|
|||
|
||||
expect(seo()->previewify('blog'))
|
||||
->toContain('previewify.app/generate/templates/1')
|
||||
->toContain(base64_encode(json_encode(['title' => 'foo', 'description' => 'bar'])));
|
||||
->toContain(base64_encode(json_encode(['previewify:title' => 'foo', 'previewify:description' => 'bar'])));
|
||||
});
|
||||
|
||||
test('the @seo helper can be used for setting a previewify image', function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue