|
172 | 172 | context "with relative page.image as a string" do
|
173 | 173 | let(:page) { make_page("image" => "/img/foo.png") }
|
174 | 174 |
|
175 |
| - it "outputs the image" do |
| 175 | + it "outputs an open graph image" do |
176 | 176 | expected = '<meta property="og:image" content="http://example.invalid/img/foo.png" />'
|
177 | 177 | expect(output).to include(expected)
|
178 | 178 | end
|
|
181 | 181 | context "with absolute page.image" do
|
182 | 182 | let(:page) { make_page("image" => "http://cdn.example.invalid/img/foo.png") }
|
183 | 183 |
|
184 |
| - it "outputs the image" do |
| 184 | + it "outputs an open graph image" do |
185 | 185 | expected = '<meta property="og:image" content="http://cdn.example.invalid/img/foo.png" />'
|
186 | 186 | expect(output).to include(expected)
|
187 | 187 | end
|
|
191 | 191 | context "when given a path" do
|
192 | 192 | let(:page) { make_page("image" => { "path" => "/img/foo.png" }) }
|
193 | 193 |
|
194 |
| - it "outputs the image" do |
| 194 | + it "outputs an open graph image" do |
195 | 195 | expected = %r!<meta property="og:image" content="http://example.invalid/img/foo.png" />!
|
196 | 196 | expect(output).to match(expected)
|
197 | 197 | end
|
|
200 | 200 | context "when given a facebook image" do
|
201 | 201 | let(:page) { make_page("image" => { "facebook" => "/img/facebook.png" }) }
|
202 | 202 |
|
203 |
| - it "outputs the image" do |
| 203 | + it "outputs an open graph image" do |
204 | 204 | expected = %r!<meta property="og:image" content="http://example.invalid/img/facebook.png" />!
|
205 | 205 | expect(output).to match(expected)
|
206 | 206 | end
|
|
209 | 209 | context "when given a twitter image" do
|
210 | 210 | let(:page) { make_page("image" => { "twitter" => "/img/twitter.png" }) }
|
211 | 211 |
|
212 |
| - it "outputs the image" do |
213 |
| - expected = %r!<meta name="twitter:image" content="http://example.invalid/img/twitter.png" />! |
| 212 | + it "outputs an open graph image" do |
| 213 | + expected = %r!<meta property="og:image" content="http://example.invalid/img/twitter.png" />! |
214 | 214 | expect(output).to match(expected)
|
215 | 215 | end
|
216 | 216 | end
|
217 | 217 |
|
218 |
| - context "when given the image height and width" do |
219 |
| - let(:image) { { "facebook" => "/img/foo.png", "height" => 1, "width" => 2 } } |
| 218 | + context "when given an image height and width" do |
| 219 | + let(:image) { { "path" => "/img/foo.png", "height" => 1, "width" => 2 } } |
220 | 220 | let(:page) { make_page("image" => image) }
|
221 | 221 |
|
222 |
| - it "outputs the image" do |
| 222 | + it "outputs an open graph image width and height" do |
223 | 223 | expected = %r!<meta property="og:image:height" content="1" />!
|
224 | 224 | expect(output).to match(expected)
|
225 | 225 | expected = %r!<meta property="og:image:width" content="2" />!
|
|
0 commit comments