require "../env_helper" require "kilt" Spectator.describe "error_redirect_helper" do it "shows next steps on embed page errors" do current_url = "/embed/IeQT18gaB-c?si=YxBQzH-GBSTS4vBS" test_env = test_env current_url test_env.set "current_page", current_url html = error_redirect_helper(test_env) expect(html).to eq "

After which you should try to:

\n\n" end it "shows next steps for watch pages" do current_url = "/watch?v=IeQT18gaB-c?si=YxBQzH-GBSTS4vBS" test_env = test_env current_url test_env.set "current_page", current_url html = error_redirect_helper(test_env) expect(html).to eq "

After which you should try to:

\n\n" end it "returns an empty string for unknown pages" do current_url = "/foo" test_env = test_env current_url test_env.set "current_page", current_url html = error_redirect_helper(test_env) expect(html).to eq "" end end