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
01face6c
Commit
01face6c
authored
Oct 16, 2019
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure action names are in sync with helper definition
This prevents names getting out of sync.
parent
15f790a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
ee/app/helpers/ee/system_note_helper.rb
ee/app/helpers/ee/system_note_helper.rb
+3
-3
ee/spec/services/system_note_service_spec.rb
ee/spec/services/system_note_service_spec.rb
+26
-0
No files found.
ee/app/helpers/ee/system_note_helper.rb
View file @
01face6c
...
@@ -19,9 +19,9 @@ module EE
...
@@ -19,9 +19,9 @@ module EE
'weight'
=>
'weight'
,
'weight'
=>
'weight'
,
'relate_epic'
=>
'epic'
,
'relate_epic'
=>
'epic'
,
'unrelate_epic'
=>
'epic'
,
'unrelate_epic'
=>
'epic'
,
'design_added'
=>
'doc-image'
,
'design
s
_added'
=>
'doc-image'
,
'design_modified'
=>
'doc-image'
,
'design
s
_modified'
=>
'doc-image'
,
'design_removed'
=>
'doc-image'
'design
s
_removed'
=>
'doc-image'
}.
freeze
}.
freeze
override
:system_note_icon_name
override
:system_note_icon_name
...
...
ee/spec/services/system_note_service_spec.rb
View file @
01face6c
...
@@ -99,6 +99,32 @@ describe SystemNoteService do
...
@@ -99,6 +99,32 @@ describe SystemNoteService do
end
end
end
end
describe
'icons'
do
where
(
:action
)
do
[
[
:creation
],
[
:modification
],
[
:deletion
]
]
end
with_them
do
before
do
version
.
actions
.
update_all
(
event:
action
)
end
subject
(
:metadata
)
do
described_class
.
design_version_added
(
version
)
.
first
.
system_note_metadata
end
it
'has a valid action'
do
expect
(
EE
::
SystemNoteHelper
::
EE_ICON_NAMES_BY_ACTION
)
.
to
include
(
metadata
.
action
)
end
end
end
context
'it succeeds'
do
context
'it succeeds'
do
where
(
:action
,
:icon
,
:human_description
)
do
where
(
:action
,
:icon
,
:human_description
)
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