spec/lib/onebox/layout_spec.rb in onebox-1.8.17 vs spec/lib/onebox/layout_spec.rb in onebox-1.8.18

- old
+ new

@@ -67,7 +67,13 @@ it "contains the view" do record = { link: "foo" } html = described_class.new("amazon", record, cache).to_html expect(html).to include(%|"foo"|) end + + it "rewrites relative image path" do + record = { image: "/image.png", link: "https://discourse.org" } + klass = described_class.new("whitelistedgeneric", record, cache) + expect(klass.view.record[:image]).to include("https://discourse.org") + end end end