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
Kazuhiko Shiozaki
gitlab-ce
Commits
276b3a7b
Commit
276b3a7b
authored
Oct 14, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Mentionable#cross_reference_exists? private.
parent
530f0d71
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
13 deletions
+6
-13
app/models/concerns/mentionable.rb
app/models/concerns/mentionable.rb
+6
-6
spec/support/mentionable_shared_examples.rb
spec/support/mentionable_shared_examples.rb
+0
-7
No files found.
app/models/concerns/mentionable.rb
View file @
276b3a7b
...
...
@@ -41,12 +41,6 @@ module Mentionable
self
end
# Determine whether or not a cross-reference Note has already been created between this Mentionable and
# the specified target.
def
cross_reference_exists?
(
target
)
SystemNoteService
.
cross_reference_exists?
(
target
,
local_reference
)
end
def
all_references
(
current_user
=
self
.
author
,
text
=
self
.
mentionable_text
)
ext
=
Gitlab
::
ReferenceExtractor
.
new
(
self
.
project
,
current_user
)
ext
.
analyze
(
text
)
...
...
@@ -111,4 +105,10 @@ module Mentionable
# Only include changed fields that are mentionable
source
.
select
{
|
key
,
val
|
mentionable
.
include?
(
key
)
}
end
# Determine whether or not a cross-reference Note has already been created between this Mentionable and
# the specified target.
def
cross_reference_exists?
(
target
)
SystemNoteService
.
cross_reference_exists?
(
target
,
local_reference
)
end
end
spec/support/mentionable_shared_examples.rb
View file @
276b3a7b
...
...
@@ -86,13 +86,6 @@ shared_examples 'a mentionable' do
subject
.
create_cross_references!
end
it
'detects existing cross-references'
do
SystemNoteService
.
cross_reference
(
mentioned_issue
,
subject
.
local_reference
,
author
)
expect
(
subject
.
cross_reference_exists?
(
mentioned_issue
)).
to
be_truthy
expect
(
subject
.
cross_reference_exists?
(
mentioned_mr
)).
to
be_falsey
end
end
shared_examples
'an editable mentionable'
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