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
d635f8bb
Commit
d635f8bb
authored
Oct 21, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve discussion_line_code set and update notes_controller_spec
parent
3176eb83
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
app/controllers/concerns/notes_actions.rb
app/controllers/concerns/notes_actions.rb
+2
-1
spec/controllers/projects/notes_controller_spec.rb
spec/controllers/projects/notes_controller_spec.rb
+5
-0
No files found.
app/controllers/concerns/notes_actions.rb
View file @
d635f8bb
...
...
@@ -107,8 +107,9 @@ module NotesActions
diff_discussion_html:
diff_discussion_html
(
discussion
),
discussion_html:
discussion_html
(
discussion
),
discussion_line_code:
discussion
.
line_code
,
)
attrs
[
:discussion_line_code
]
=
discussion
.
line_code
if
discussion
.
is_a?
(
DiffDiscussion
)
end
end
else
...
...
spec/controllers/projects/notes_controller_spec.rb
View file @
d635f8bb
...
...
@@ -59,6 +59,7 @@ describe Projects::NotesController do
expect
(
note_json
[
:id
]).
to
eq
(
note
.
id
)
expect
(
note_json
[
:discussion_html
]).
not_to
be_nil
expect
(
note_json
[
:diff_discussion_html
]).
to
be_nil
expect
(
note_json
[
:discussion_line_code
]).
to
be_nil
end
end
...
...
@@ -74,6 +75,7 @@ describe Projects::NotesController do
expect
(
note_json
[
:id
]).
to
eq
(
note
.
id
)
expect
(
note_json
[
:discussion_html
]).
not_to
be_nil
expect
(
note_json
[
:diff_discussion_html
]).
not_to
be_nil
expect
(
note_json
[
:discussion_line_code
]).
not_to
be_nil
end
end
...
...
@@ -92,6 +94,7 @@ describe Projects::NotesController do
expect
(
note_json
[
:id
]).
to
eq
(
note
.
id
)
expect
(
note_json
[
:discussion_html
]).
not_to
be_nil
expect
(
note_json
[
:diff_discussion_html
]).
to
be_nil
expect
(
note_json
[
:discussion_line_code
]).
to
be_nil
end
end
...
...
@@ -104,6 +107,7 @@ describe Projects::NotesController do
expect
(
note_json
[
:id
]).
to
eq
(
note
.
id
)
expect
(
note_json
[
:discussion_html
]).
to
be_nil
expect
(
note_json
[
:diff_discussion_html
]).
to
be_nil
expect
(
note_json
[
:discussion_line_code
]).
to
be_nil
end
end
end
...
...
@@ -120,6 +124,7 @@ describe Projects::NotesController do
expect
(
note_json
[
:html
]).
not_to
be_nil
expect
(
note_json
[
:discussion_html
]).
to
be_nil
expect
(
note_json
[
:diff_discussion_html
]).
to
be_nil
expect
(
note_json
[
:discussion_line_code
]).
to
be_nil
end
end
...
...
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