Fix unit tests

This commit is contained in:
Scott Perry 2022-07-27 15:02:22 -07:00
parent 95eda2f953
commit aeb79afa58
1 changed files with 8 additions and 2 deletions

View File

@ -3,7 +3,13 @@
RSpec.describe Jekyll::SeoTag::ImageDrop do
let(:config) { { "title" => "site title" } }
let(:image) { nil }
let(:page_meta) { { "image" => image, "dir" => "foo" } }
let(:page_meta) do
{
"image" => image,
"dir" => "foo",
"date" => "2017-01-01"
}
end
let(:page) { make_page(page_meta) }
let(:site) { make_site(config) }
let(:context) { make_context(:page => page, :site => site) }
@ -19,7 +25,7 @@ RSpec.describe Jekyll::SeoTag::ImageDrop do
let(:page) { make_post(page_meta) }
it "returns the image url relative to the post directory" do
expect(subject["path"]).to eql("/2022/07/26/image.png")
expect(subject["path"]).to eql("/2017/01/01/image.png")
end
end