test with a Post as well

This commit is contained in:
Andre Arko 2022-07-26 22:13:58 -07:00
parent bfb31af482
commit b7c533b740
No known key found for this signature in database
GPG Key ID: BBE521252B9D156A
1 changed files with 9 additions and 0 deletions

View File

@ -14,6 +14,15 @@ RSpec.describe Jekyll::SeoTag::ImageDrop do
Jekyll.logger.log_level = :error
end
context "with a post object" do
let(:image) { "image.png" }
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")
end
end
context "with image as a relative path" do
let(:image) { "image.png" }