Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
2403a28b
Commit
2403a28b
authored
Apr 23, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include caret in CommitRange#reference_title
parent
c11d3c57
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
app/models/commit_range.rb
app/models/commit_range.rb
+1
-1
spec/models/commit_range_spec.rb
spec/models/commit_range_spec.rb
+5
-1
No files found.
app/models/commit_range.rb
View file @
2403a28b
...
...
@@ -73,7 +73,7 @@ class CommitRange
# Returns a String for use in a link's title attribute
def
reference_title
"Commits
#{
sha_from
}
through
#{
sha_to
}
"
"Commits
#{
sha_from
_as_param
}
through
#{
sha_to
}
"
end
# Return a Hash of parameters for passing to a URL helper
...
...
spec/models/commit_range_spec.rb
View file @
2403a28b
...
...
@@ -49,9 +49,13 @@ describe CommitRange do
end
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
}
"
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
describe
'#to_param'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment