diff options
author | Stan Hu <stanhu@gmail.com> | 2015-08-02 10:07:23 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-08-02 10:07:23 +0300 |
commit | ecbe119af13dfef707694fc7a271d60f3af8f779 (patch) | |
tree | 7b3883c0719fc7689a021a5b0b256dec5aa13de8 /spec/lib | |
parent | 208e07fe6f4f5954f01462be6d5b595ec8d2fedf (diff) |
Fix "Network" and "Graphs" pages for branches with encoded slashes
Closes #1359
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/extracts_path_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/extracts_path_spec.rb b/spec/lib/extracts_path_spec.rb index 4439775f612..9c115bbfc6a 100644 --- a/spec/lib/extracts_path_spec.rb +++ b/spec/lib/extracts_path_spec.rb @@ -29,6 +29,16 @@ describe ExtractsPath do assign_ref_vars expect(@logs_path).to eq("/#{@project.path_with_namespace}/refs/#{ref}/logs_tree/files/ruby/popen.rb") end + + context 'escaped sequences in ref' do + let(:ref) { "improve%2Fawesome" } + + it "id should have no escape sequences" do + assign_ref_vars + expect(@ref).to eq('improve/awesome') + expect(@logs_path).to eq("/#{@project.path_with_namespace}/refs/#{ref}/logs_tree/files/ruby/popen.rb") + end + end end describe '#extract_ref' do |