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
4d53b3d6
Commit
4d53b3d6
authored
Apr 19, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a failure in spec/services/system_note_service_spec.rb
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
f0a65ccc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
29 deletions
+1
-29
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+1
-29
No files found.
spec/services/system_note_service_spec.rb
View file @
4d53b3d6
...
...
@@ -947,7 +947,7 @@ describe SystemNoteService do
it
'sets the note text'
do
noteable
.
update_attribute
(
:time_estimate
,
277200
)
expect
(
subject
.
note
).
to
eq
"changed time estimate to 1w 4d 5h"
expect
(
subject
.
note
).
to
eq
"changed time estimate to 1w 4d 5h
,
"
end
end
...
...
@@ -984,34 +984,6 @@ describe SystemNoteService do
end
end
describe
'.change_time_estimate'
do
subject
{
described_class
.
change_time_estimate
(
noteable
,
project
,
author
)
}
it_behaves_like
'a system note'
do
let
(
:action
)
{
'time_tracking'
}
end
context
'with a time estimate'
do
it
'sets the note text'
do
noteable
.
update_attribute
(
:time_estimate
,
277200
)
expect
(
subject
.
note
).
to
eq
"changed time estimate to 1w 4d 5h,"
end
it
'appends a comma to separate the note from the update_at time'
do
noteable
.
update_attribute
(
:time_estimate
,
277200
)
expect
(
subject
.
note
).
to
end_with
(
','
)
end
end
context
'without a time estimate'
do
it
'sets the note text'
do
expect
(
subject
.
note
).
to
eq
"removed time estimate"
end
end
end
describe
'.change_time_spent'
do
# We need a custom noteable in order to the shared examples to be green.
let
(
:noteable
)
do
...
...
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