From 3d352ed062b3645604308b552975eb10447ca43d Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Tue, 9 Jun 2020 09:28:37 +0000 Subject: [PATCH] Add test for slash escaping --- spec/rename_spec.cr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/rename_spec.cr b/spec/rename_spec.cr index 6108974..c830581 100644 --- a/spec/rename_spec.cr +++ b/spec/rename_spec.cr @@ -68,4 +68,9 @@ describe Rule do .should eq "Ch. CH ID testing" rule.render({} of String => String).should eq "testing" end + + it "escapes slash" do + rule = Rule.new "{id}" + rule.render({"id" => "/hello/world"}).should eq "_hello_world" + end end