Commit 2403a28b authored by Robert Speicher's avatar Robert Speicher

Include caret in CommitRange#reference_title

parent c11d3c57
...@@ -73,7 +73,7 @@ class CommitRange ...@@ -73,7 +73,7 @@ class CommitRange
# Returns a String for use in a link's title attribute # Returns a String for use in a link's title attribute
def reference_title def reference_title
"Commits #{sha_from} through #{sha_to}" "Commits #{sha_from_as_param} through #{sha_to}"
end end
# Return a Hash of parameters for passing to a URL helper # Return a Hash of parameters for passing to a URL helper
......
...@@ -49,9 +49,13 @@ describe CommitRange do ...@@ -49,9 +49,13 @@ describe CommitRange do
end end
describe '#reference_title' do describe '#reference_title' do
it 'returns the correct String' do it 'returns the correct String for three-dot ranges' do
expect(range.reference_title).to eq "Commits #{sha_from} through #{sha_to}" expect(range.reference_title).to eq "Commits #{sha_from} through #{sha_to}"
end end
it 'returns the correct String for two-dot ranges' do
expect(range2.reference_title).to eq "Commits #{sha_from}^ through #{sha_to}"
end
end end
describe '#to_param' do describe '#to_param' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment