From b7c533b740277a25d56d28d8181fe68f0ad4c476 Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Tue, 26 Jul 2022 22:13:58 -0700 Subject: [PATCH] test with a Post as well --- spec/jekyll_seo_tag/image_drop_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/jekyll_seo_tag/image_drop_spec.rb b/spec/jekyll_seo_tag/image_drop_spec.rb index 61531f2..98154c5 100644 --- a/spec/jekyll_seo_tag/image_drop_spec.rb +++ b/spec/jekyll_seo_tag/image_drop_spec.rb @@ -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" }