BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
100cdce2
Commit
100cdce2
authored
Jan 12, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure time_ago_with_tooltip is using a Time object
Somehow this test existed on EE but not in CE, so it started failing after a bad CE-to-EE merge.
parent
d047db91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
application_helper.rb
app/helpers/application_helper.rb
+1
-1
application_helper_spec.rb
spec/helpers/application_helper_spec.rb
+4
-0
No files found.
app/helpers/application_helper.rb
View file @
100cdce2
...
...
@@ -205,7 +205,7 @@ module ApplicationHelper
def
time_ago_with_tooltip
(
time
,
placement:
'top'
,
html_class:
'time_ago'
,
skip_js:
false
)
element
=
content_tag
:time
,
time
.
to_s
,
class:
"
#{
html_class
}
js-timeago js-timeago-pending"
,
datetime:
time
.
getutc
.
iso8601
,
datetime:
time
.
to_time
.
getutc
.
iso8601
,
title:
time
.
in_time_zone
.
to_s
(
:medium
),
data:
{
toggle:
'tooltip'
,
placement:
placement
,
container:
'body'
}
...
...
spec/helpers/application_helper_spec.rb
View file @
100cdce2
...
...
@@ -285,6 +285,10 @@ describe ApplicationHelper do
it
'allows the script tag to be excluded'
do
expect
(
element
(
skip_js:
true
)).
not_to
include
'script'
end
it
'converts to Time'
do
expect
{
helper
.
time_ago_with_tooltip
(
Date
.
today
)
}.
not_to
raise_error
end
end
describe
'render_markup'
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