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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2609c2a7
Commit
2609c2a7
authored
Mar 06, 2019
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec description and outdated comments
parent
90527b9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
app/controllers/projects/blob_controller.rb
app/controllers/projects/blob_controller.rb
+0
-2
spec/controllers/projects/blob_controller_spec.rb
spec/controllers/projects/blob_controller_spec.rb
+2
-2
No files found.
app/controllers/projects/blob_controller.rb
View file @
2609c2a7
...
...
@@ -108,8 +108,6 @@ class Projects::BlobController < Projects::ApplicationController
# Converts a String array to Gitlab::Diff::Line array
def
render_diff_lines
@lines
.
map!
do
|
line
|
# These are marked as context lines but are loaded from blobs.
# We also have context lines loaded from diffs in other places.
diff_line
=
Gitlab
::
Diff
::
Line
.
new
(
line
,
nil
,
nil
,
nil
,
nil
)
diff_line
.
rich_text
=
line
diff_line
...
...
spec/controllers/projects/blob_controller_spec.rb
View file @
2609c2a7
...
...
@@ -173,7 +173,7 @@ describe Projects::BlobController do
expect
(
match_line
[
'type'
]).
to
be_nil
end
it
'adds bottom match line when "t
"o
is less than blob size'
do
it
'adds bottom match line when "t
o"
is less than blob size'
do
do_get
(
since:
1
,
to:
5
,
offset:
10
,
from_merge_request:
true
,
bottom:
true
)
match_line
=
JSON
.
parse
(
response
.
body
).
last
...
...
@@ -183,7 +183,7 @@ describe Projects::BlobController do
expect
(
match_line
[
'meta_data'
]).
to
have_key
(
'new_pos'
)
end
it
'does not add bottom match line when "to" is
less than
blob size'
do
it
'does not add bottom match line when "to" is
equal to
blob size'
do
commit_id
=
project
.
repository
.
commit
(
'master'
).
id
blob
=
project
.
repository
.
blob_at
(
commit_id
,
'CHANGELOG'
)
do_get
(
since:
1
,
to:
blob
.
lines
.
count
,
offset:
10
,
from_merge_request:
true
,
bottom:
true
)
...
...
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