|
59 | 59 | $this->assertDatabaseHas(SeoField::class, [ |
60 | 60 | 'type' => BaseTag::class, |
61 | 61 | 'name' => 'title', |
62 | | - 'content' => 'new title', |
| 62 | + 'content' => json_encode('new title'), |
63 | 63 | ]); |
64 | 64 |
|
65 | 65 | $this->assertDatabaseHas(SeoField::class, [ |
66 | 66 | 'type' => BaseTag::class, |
67 | 67 | 'name' => 'description', |
68 | | - 'content' => 'new description', |
| 68 | + 'content' => json_encode('new description'), |
69 | 69 | ]); |
70 | 70 | }); |
71 | 71 |
|
|
78 | 78 | $this->assertDatabaseHas(SeoField::class, [ |
79 | 79 | 'type' => BaseTag::class, |
80 | 80 | 'name' => 'title', |
81 | | - 'content' => 'seo title', |
| 81 | + 'content' => json_encode('seo title'), |
82 | 82 | ]); |
83 | 83 |
|
84 | 84 | $this->assertDatabaseHas(SeoField::class, [ |
85 | 85 | 'type' => BaseTag::class, |
86 | 86 | 'name' => 'description', |
87 | | - 'content' => 'new description', |
| 87 | + 'content' => json_encode('new description'), |
88 | 88 | ]); |
89 | 89 | }); |
90 | 90 |
|
|
96 | 96 | $this->assertDatabaseHas(SeoField::class, [ |
97 | 97 | 'type' => BaseTag::class, |
98 | 98 | 'name' => 'title', |
99 | | - 'content' => 'title', |
| 99 | + 'content' => json_encode('title'), |
100 | 100 | ]); |
101 | 101 | }); |
102 | 102 |
|
103 | 103 | it('can init the seo', function () { |
104 | 104 | $page = Page::create([ |
105 | 105 | 'title' => 'Title', |
106 | | - 'description' => 'Description', |
| 106 | + 'description' => json_encode('Description'), |
107 | 107 | ]); |
108 | 108 |
|
109 | 109 | // 2 from beforeEach |
|
118 | 118 | 'model_id' => $page->id, |
119 | 119 | 'type' => BaseTag::class, |
120 | 120 | 'name' => 'title', |
121 | | - 'content' => 'Title', |
| 121 | + 'content' => json_encode('Title'), |
122 | 122 | ]); |
123 | 123 |
|
124 | 124 | $this->assertDatabaseHas(SeoField::class, [ |
125 | 125 | 'model_type' => Page::class, |
126 | 126 | 'model_id' => $page->id, |
127 | 127 | 'type' => BaseTag::class, |
128 | 128 | 'name' => 'description', |
129 | | - 'content' => '', |
| 129 | + 'content' => json_encode(''), |
130 | 130 | ]); |
131 | 131 | }); |
0 commit comments