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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
6f356148
Commit
6f356148
authored
Oct 12, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix mentionable specs
parent
7a0cc665
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
7 deletions
+6
-7
spec/models/commit_spec.rb
spec/models/commit_spec.rb
+2
-2
spec/models/issue_spec.rb
spec/models/issue_spec.rb
+1
-1
spec/models/note_spec.rb
spec/models/note_spec.rb
+2
-3
spec/support/mentionable_shared_examples.rb
spec/support/mentionable_shared_examples.rb
+1
-1
No files found.
spec/models/commit_spec.rb
View file @
6f356148
...
...
@@ -89,9 +89,9 @@ eos
end
it_behaves_like
'a mentionable'
do
subject
{
commit
}
subject
{
c
reate
(
:project
).
c
ommit
}
let
(
:author
)
{
create
(
:user
,
email:
commi
t
.
author_email
)
}
let
(
:author
)
{
create
(
:user
,
email:
subjec
t
.
author_email
)
}
let
(
:backref_text
)
{
"commit
#{
subject
.
id
}
"
}
let
(
:set_mentionable_text
)
do
->
(
txt
)
{
allow
(
subject
).
to
receive
(
:safe_message
).
and_return
(
txt
)
}
...
...
spec/models/issue_spec.rb
View file @
6f356148
...
...
@@ -69,7 +69,7 @@ describe Issue do
end
it_behaves_like
'an editable mentionable'
do
subject
{
create
(
:issue
,
project:
project
)
}
subject
{
create
(
:issue
)
}
let
(
:backref_text
)
{
"issue
#{
subject
.
to_reference
}
"
}
let
(
:set_mentionable_text
)
{
->
(
txt
){
subject
.
description
=
txt
}
}
...
...
spec/models/note_spec.rb
View file @
6f356148
...
...
@@ -192,10 +192,9 @@ describe Note do
end
it_behaves_like
'an editable mentionable'
do
subject
{
create
:note
,
noteable:
issue
,
project:
project
}
subject
{
create
:note
,
noteable:
issue
,
project:
issue
.
project
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:issue
)
{
create
:issue
,
project:
project
}
let
(
:issue
)
{
create
:issue
}
let
(
:backref_text
)
{
issue
.
gfm_reference
}
let
(
:set_mentionable_text
)
{
->
(
txt
)
{
subject
.
note
=
txt
}
}
end
...
...
spec/support/mentionable_shared_examples.rb
View file @
6f356148
...
...
@@ -5,7 +5,7 @@
# - let(:set_mentionable_text) { lambda { |txt| "block that assigns txt to the subject's mentionable_text" } }
def
common_mentionable_setup
let
(
:project
)
{
create
:
project
}
let
(
:project
)
{
subject
.
project
}
let
(
:author
)
{
subject
.
author
}
let
(
:mentioned_issue
)
{
create
(
:issue
,
project:
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