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
ed1ca47c
Commit
ed1ca47c
authored
Aug 28, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rs-aggregate-system-note-specs' into 'master'
Combine multiple expectations into one for shared system note example See merge request !13814
parents
58bddf28
93f08ba0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
25 deletions
+4
-25
system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+4
-25
No files found.
spec/services/system_note_service_spec.rb
View file @
ed1ca47c
...
...
@@ -13,37 +13,16 @@ describe SystemNoteService do
let
(
:expected_noteable
)
{
noteable
}
let
(
:commit_count
)
{
nil
}
it
'
is valid'
do
it
'
has the correct attributes'
,
:aggregate_failures
do
expect
(
subject
).
to
be_valid
end
expect
(
subject
).
to
be_system
it
'sets the noteable model'
do
expect
(
subject
.
noteable
).
to
eq
expected_noteable
end
it
'sets the project'
do
expect
(
subject
.
project
).
to
eq
project
end
it
'sets the author'
do
expect
(
subject
.
author
).
to
eq
author
end
it
'is a system note'
do
expect
(
subject
).
to
be_system
end
context
'metadata'
do
it
'creates a new system note metadata record'
do
expect
{
subject
}.
to
change
{
SystemNoteMetadata
.
count
}.
from
(
0
).
to
(
1
)
end
it
'creates a record correctly'
do
metadata
=
subject
.
system_note_metadata
expect
(
metadata
.
commit_count
).
to
eq
(
commit_count
)
expect
(
metadata
.
action
).
to
eq
(
action
)
end
expect
(
subject
.
system_note_metadata
.
action
).
to
eq
(
action
)
expect
(
subject
.
system_note_metadata
.
commit_count
).
to
eq
(
commit_count
)
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