|
18 | 18 |
|
19 | 19 | test('previewify templates can be given data', function () {
|
20 | 20 | seo()->previewify('blog', 1);
|
21 |
| - expect(seo()->previewify('blog', ['title' => 'abc', 'excerpt' => 'def'])) |
| 21 | + expect(seo()->previewify('blog', ['title' => 'abc', 'previewify:excerpt' => 'def'])) |
22 | 22 | ->toContain('previewify.app/generate/templates/1')
|
23 |
| - ->toContain(base64_encode(json_encode(['title' => 'abc', 'excerpt' => 'def']))); |
| 23 | + ->toContain(base64_encode(json_encode(['previewify:title' => 'abc', 'previewify:excerpt' => 'def']))); |
24 | 24 | });
|
25 | 25 |
|
26 | 26 | test('the previewify method returns a link to a signed url', function () {
|
27 | 27 | seo()->previewify('blog', 1);
|
28 | 28 |
|
29 | 29 | expect(seo()->previewify('blog', ['title' => 'abc']))
|
30 |
| - ->toContain('?signature=' . hash_hmac('sha256', base64_encode(json_encode(['title' => 'abc'])), config('services.previewify.key'))); |
| 30 | + ->toContain('?signature=' . hash_hmac('sha256', base64_encode(json_encode(['previewify:title' => 'abc'])), config('services.previewify.key'))); |
31 | 31 | });
|
32 | 32 |
|
33 | 33 | test("previewify templates use default data when they're not passed any data explicitly", function () {
|
|
37 | 37 |
|
38 | 38 | expect(seo()->previewify('blog'))
|
39 | 39 | ->toContain('previewify.app/generate/templates/1')
|
40 |
| - ->toContain(base64_encode(json_encode(['title' => 'foo', 'description' => 'bar']))); |
| 40 | + ->toContain(base64_encode(json_encode(['previewify:title' => 'foo', 'previewify:description' => 'bar']))); |
41 | 41 | });
|
42 | 42 |
|
43 | 43 | test('previewify images are used as the cover images', function () {
|
|
66 | 66 |
|
67 | 67 | expect(seo()->previewify('blog'))
|
68 | 68 | ->toContain('previewify.app/generate/templates/1')
|
69 |
| - ->toContain(base64_encode(json_encode(['title' => 'foo', 'description' => 'bar']))); |
| 69 | + ->toContain(base64_encode(json_encode(['previewify:title' => 'foo', 'previewify:description' => 'bar']))); |
70 | 70 | });
|
71 | 71 |
|
72 | 72 | test('the @seo helper can be used for setting a previewify image', function () {
|
|
0 commit comments