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
809e72ca
Commit
809e72ca
authored
Mar 18, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update specs based on new wiki-page factory sequence
Also re-order conditions so that preposition test passes
parent
a3982c2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
app/helpers/events_helper.rb
app/helpers/events_helper.rb
+2
-2
spec/helpers/events_helper_spec.rb
spec/helpers/events_helper_spec.rb
+4
-4
No files found.
app/helpers/events_helper.rb
View file @
809e72ca
...
...
@@ -70,10 +70,10 @@ module EventsHelper
def
event_preposition
(
event
)
if
event
.
wiki_page?
_
(
"Events|in the wiki for"
)
elsif
event
.
push_action?
||
event
.
commented_action?
||
event
.
target
"at"
elsif
event
.
milestone?
"in"
elsif
event
.
push_action?
||
event
.
commented_action?
||
event
.
target
"at"
end
end
...
...
spec/helpers/events_helper_spec.rb
View file @
809e72ca
...
...
@@ -121,8 +121,7 @@ describe EventsHelper do
end
end
# This branch appears to be unreachable
context
'for milestone events'
,
:pending
do
context
'for milestone events'
do
let
(
:event
)
{
create
(
:event
,
target:
create
(
:milestone
))
}
it
'returns a suitable phrase'
do
...
...
@@ -156,10 +155,11 @@ describe EventsHelper do
it
'produces a suitable title chunk'
do
url
=
helper
.
event_wiki_page_target_url
(
event
)
title
=
event
.
target_title
html
=
[
"<span class=
\"
event-target-type append-right-4
\"
>wiki page</span>"
,
"<a title=
\"
Title.with.dot
\"
class=
\"
has-tooltip event-target-link append-right-4
\"
href=
\"
#{
url
}
\"
>"
,
event
.
target
.
title
,
"<a title=
\"
#{
title
}
\"
class=
\"
has-tooltip event-target-link append-right-4
\"
href=
\"
#{
url
}
\"
>"
,
title
,
"</a>"
].
join
...
...
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