BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
dcec4c53
Commit
dcec4c53
authored
Mar 07, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finding discussions in NotesFinder is no longer required.
Since the MergeRequest is now a required param for resolving discussions
parent
b9aa6c35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
17 deletions
+0
-17
notes_finder.rb
app/finders/notes_finder.rb
+0
-6
notes_finder_spec.rb
spec/finders/notes_finder_spec.rb
+0
-11
No files found.
app/finders/notes_finder.rb
View file @
dcec4c53
...
...
@@ -11,7 +11,6 @@ class NotesFinder
# target_type: string
# target_id: integer
# last_fetched_at: time
# discussion_id: string
# search: string
#
def
initialize
(
project
,
current_user
,
params
=
{})
...
...
@@ -23,7 +22,6 @@ class NotesFinder
def
execute
@notes
=
since_fetch_at
(
@params
[
:last_fetched_at
])
if
@params
[
:last_fetched_at
]
@notes
=
for_discussion
(
@params
[
:discussion_id
])
if
@params
[
:discussion_id
]
@notes
end
...
...
@@ -102,8 +100,4 @@ class NotesFinder
@notes
.
where
(
'updated_at > ?'
,
last_fetched_at
-
FETCH_OVERLAP
).
fresh
end
def
for_discussion
(
discussion_id
)
@notes
.
where
(
discussion_id:
discussion_id
)
end
end
spec/finders/notes_finder_spec.rb
View file @
dcec4c53
...
...
@@ -41,17 +41,6 @@ describe NotesFinder do
expect
(
notes
.
count
).
to
eq
(
0
)
end
context
'for a certain discussion'
do
let!
(
:note_in_a_commit_discussion
)
{
create
(
:note_on_commit
,
project:
project
)
}
let!
(
:other_note
)
{
create
(
:note_on_merge_request
,
project:
project
)
}
it
'finds the only the notes for a certain discussion id'
do
notes
=
described_class
.
new
(
project
,
user
,
discussion_id:
note_in_a_commit_discussion
.
discussion_id
).
execute
expect
(
notes
).
to
contain_exactly
(
note_in_a_commit_discussion
)
end
end
context
'on restricted projects'
do
let
(
:project
)
do
create
(
:empty_project
,
...
...
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