Skip to content

Commit

Permalink
Reproduce #792 error ../ relative links and cache
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoporreca committed Mar 6, 2023
1 parent bd89111 commit 21044c9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/html-proofer/links_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -774,4 +774,18 @@
proofer = run_proofer(link_pointing_to_sibling, :file)
expect(proofer.failed_checks.count).to(eq(0))
end

it "navigates to sibling through parent, with cache" do
link_pointing_to_sibling = File.join(FIXTURES_DIR, "links", "root_folder", "admin", "link_to_relative_parent.html")
cache_storage_dir = File.join(FIXTURES_DIR, "cache", "tmp_sibling_cache")
cache_file = "cache.json"
cache_filepath = File.join(cache_storage_dir, cache_file)
proofer = run_proofer(
link_pointing_to_sibling,
:file,
cache: { timeframe: { internal: "1d" }, storage_dir: cache_storage_dir, cache_file: cache_file},
)
File.delete(cache_filepath) if File.exist?(cache_filepath)
expect(proofer.failed_checks.count).to(eq(0))
end
end

0 comments on commit 21044c9

Please sign in to comment.