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
73ca7751
Commit
73ca7751
authored
Dec 19, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicated `.change_time_spent` spec block
parent
8a7bd7ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
47 deletions
+0
-47
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+0
-47
No files found.
spec/services/system_note_service_spec.rb
View file @
73ca7751
...
...
@@ -961,53 +961,6 @@ describe SystemNoteService do
end
end
describe
'.change_time_spent'
do
# We need a custom noteable in order to the shared examples to be green.
let
(
:noteable
)
do
mr
=
create
(
:merge_request
,
source_project:
project
)
mr
.
spend_time
(
duration:
360000
,
user:
author
)
mr
.
save!
mr
end
subject
do
described_class
.
change_time_spent
(
noteable
,
project
,
author
)
end
it_behaves_like
'a system note'
do
let
(
:action
)
{
'time_tracking'
}
end
context
'when time was added'
do
it
'sets the note text'
do
spend_time!
(
277200
)
expect
(
subject
.
note
).
to
eq
"added 1w 4d 5h of time spent"
end
end
context
'when time was subtracted'
do
it
'sets the note text'
do
spend_time!
(
-
277200
)
expect
(
subject
.
note
).
to
eq
"subtracted 1w 4d 5h of time spent"
end
end
context
'when time was removed'
do
it
'sets the note text'
do
spend_time!
(
:reset
)
expect
(
subject
.
note
).
to
eq
"removed time spent"
end
end
def
spend_time!
(
seconds
)
noteable
.
spend_time
(
duration:
seconds
,
user:
author
)
noteable
.
save!
end
end
describe
'.discussion_continued_in_issue'
do
let
(
:discussion
)
{
create
(
:diff_note_on_merge_request
,
project:
project
).
to_discussion
}
let
(
:merge_request
)
{
discussion
.
noteable
}
...
...
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