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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
8673a70f
Commit
8673a70f
authored
Feb 18, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve formatted message for tasks when action is a mention
parent
a74a69db
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
app/models/task.rb
app/models/task.rb
+1
-1
features/steps/dashboard/task_queue.rb
features/steps/dashboard/task_queue.rb
+3
-3
spec/models/task_spec.rb
spec/models/task_spec.rb
+7
-1
No files found.
app/models/task.rb
View file @
8673a70f
...
...
@@ -46,7 +46,7 @@ class Task < ActiveRecord::Base
def
action_name
case
action
when
ASSIGNED
then
'assigned'
when
MENTIONED
then
'mentioned on'
when
MENTIONED
then
'mentioned
you
on'
end
end
...
...
features/steps/dashboard/task_queue.rb
View file @
8673a70f
...
...
@@ -31,9 +31,9 @@ class Spinach::Features::DashboardTaskQueue < Spinach::FeatureSteps
expect
(
page
).
to
have_link
project
.
name_with_namespace
should_see_task
(
1
,
"John Doe assigned merge request #
#{
merge_request
.
iid
}
"
,
merge_request
.
title
)
should_see_task
(
2
,
"John Doe mentioned on issue #
#{
issue
.
iid
}
"
,
"
#{
current_user
.
to_reference
}
Wdyt?"
)
should_see_task
(
2
,
"John Doe mentioned
you
on issue #
#{
issue
.
iid
}
"
,
"
#{
current_user
.
to_reference
}
Wdyt?"
)
should_see_task
(
3
,
"John Doe assigned issue #
#{
issue
.
iid
}
"
,
issue
.
title
)
should_see_task
(
4
,
"Mary Jane mentioned on issue #
#{
issue
.
iid
}
"
,
issue
.
title
)
should_see_task
(
4
,
"Mary Jane mentioned
you
on issue #
#{
issue
.
iid
}
"
,
issue
.
title
)
end
step
'I mark the pending task as done'
do
...
...
@@ -77,7 +77,7 @@ class Spinach::Features::DashboardTaskQueue < Spinach::FeatureSteps
end
step
'I should not see tasks related to "Mary Jane" in the list'
do
should_not_see_task
"Mary Jane mentioned on issue #
#{
issue
.
iid
}
"
should_not_see_task
"Mary Jane mentioned
you
on issue #
#{
issue
.
iid
}
"
end
step
'I should not see tasks related to "Merge Requests" in the list'
do
...
...
spec/models/task_spec.rb
View file @
8673a70f
...
...
@@ -38,11 +38,17 @@ describe Task, models: true do
end
describe
'#action_name'
do
it
'returns
assigned when action is assigned
'
do
it
'returns
proper message when action is an assigment
'
do
subject
.
action
=
Task
::
ASSIGNED
expect
(
subject
.
action_name
).
to
eq
'assigned'
end
it
'returns proper message when action is a mention'
do
subject
.
action
=
Task
::
MENTIONED
expect
(
subject
.
action_name
).
to
eq
'mentioned you on'
end
end
describe
'#body?'
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