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
5ada96db
Commit
5ada96db
authored
Apr 28, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Note model spec
parent
2cca78b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
app/models/note.rb
app/models/note.rb
+3
-2
spec/models/note_spec.rb
spec/models/note_spec.rb
+4
-4
No files found.
app/models/note.rb
View file @
5ada96db
...
...
@@ -82,8 +82,10 @@ class Note < ActiveRecord::Base
def
create_cross_reference_note
(
noteable
,
mentioner
,
author
)
gfm_reference
=
mentioner_gfm_ref
(
noteable
,
mentioner
)
project
=
noteable
.
project
note_options
=
{
project:
noteable
.
project
,
project:
project
,
author:
author
,
note:
cross_reference_note_content
(
gfm_reference
),
system:
true
...
...
@@ -95,7 +97,6 @@ class Note < ActiveRecord::Base
note_options
.
merge!
(
noteable:
noteable
)
end
if
noteable
.
is_a?
(
ExternalIssue
)
project
.
issues_tracker
.
create_cross_reference_note
(
noteable
,
mentioner
,
author
)
else
...
...
spec/models/note_spec.rb
View file @
5ada96db
...
...
@@ -380,7 +380,7 @@ describe Note do
jira_tracker
.
destroy!
end
subject
{
Note
.
create_cross_reference_note
(
jira_issue
,
mergereq
,
author
,
project
)
}
subject
{
Note
.
create_cross_reference_note
(
jira_issue
,
mergereq
,
author
)
}
it
{
is_expected
.
to
eq
(
jira_status_message
)
}
end
...
...
@@ -419,7 +419,7 @@ describe Note do
to_return
(
:body
=>
jira_issue_comments
)
end
subject
{
Note
.
create_cross_reference_note
(
jira_issue
,
commit
,
author
,
project
)
}
subject
{
Note
.
create_cross_reference_note
(
jira_issue
,
commit
,
author
)
}
it
{
is_expected
.
to
eq
(
jira_status_message
)
}
end
...
...
@@ -431,7 +431,7 @@ describe Note do
to_return
(
:body
=>
"{
\"
comments
\"
:[{
\"
body
\"
:
\"
#{
message
}
\"
}]}"
)
end
subject
{
Note
.
create_cross_reference_note
(
jira_issue
,
commit
,
author
,
project
)
}
subject
{
Note
.
create_cross_reference_note
(
jira_issue
,
commit
,
author
)
}
it
{
is_expected
.
not_to
eq
(
jira_status_message
)
}
end
end
...
...
@@ -450,7 +450,7 @@ describe Note do
jira_tracker
.
destroy!
end
subject
{
Note
.
create_cross_reference_note
(
jira_issue
,
issue
,
author
,
project
)
}
subject
{
Note
.
create_cross_reference_note
(
jira_issue
,
issue
,
author
)
}
it
{
is_expected
.
to
eq
(
jira_status_message
)
}
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