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
66123d44
Commit
66123d44
authored
May 08, 2018
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicated shared examples
parent
28539f1f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
27 deletions
+0
-27
spec/support/shared_examples/services/common_system_notes_examples.rb
.../shared_examples/services/common_system_notes_examples.rb
+0
-27
No files found.
spec/support/shared_examples/services/common_system_notes_examples.rb
deleted
100644 → 0
View file @
28539f1f
shared_examples
'system note creation'
do
|
update_params
,
note_text
|
subject
{
described_class
.
new
(
project
,
user
).
execute
(
issuable
,
[])}
before
do
issuable
.
assign_attributes
(
update_params
)
issuable
.
save
end
it
'creates 1 system note with the correct content'
do
expect
{
subject
}.
to
change
{
Note
.
count
}.
from
(
0
).
to
(
1
)
note
=
Note
.
last
expect
(
note
.
note
).
to
match
(
note_text
)
expect
(
note
.
noteable_type
).
to
eq
(
issuable
.
class
.
name
)
end
end
shared_examples
'WIP notes creation'
do
|
wip_action
|
subject
{
described_class
.
new
(
project
,
user
).
execute
(
issuable
,
[])
}
it
'creates WIP toggle and title change notes'
do
expect
{
subject
}.
to
change
{
Note
.
count
}.
from
(
0
).
to
(
2
)
expect
(
Note
.
first
.
note
).
to
match
(
"
#{
wip_action
}
as a **Work In Progress**"
)
expect
(
Note
.
second
.
note
).
to
match
(
'changed title'
)
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