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
Tatuya Kamada
gitlab-ce
Commits
ff27747e
Commit
ff27747e
authored
Jun 19, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix timezone-based time_ago_with_tooltip spec failures
parent
1c4bf0e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
spec/helpers/application_helper_spec.rb
spec/helpers/application_helper_spec.rb
+5
-4
No files found.
spec/helpers/application_helper_spec.rb
View file @
ff27747e
...
...
@@ -242,7 +242,8 @@ describe ApplicationHelper do
describe
'time_ago_with_tooltip'
do
def
element
(
*
arguments
)
time
=
Time
.
parse
(
'2015-07-02 08:00'
)
Time
.
zone
=
'UTC'
time
=
Time
.
zone
.
parse
(
'2015-07-02 08:00'
)
element
=
time_ago_with_tooltip
(
time
,
*
arguments
)
Nokogiri
::
HTML
::
DocumentFragment
.
parse
(
element
).
first_element_child
...
...
@@ -253,15 +254,15 @@ describe ApplicationHelper do
end
it
'includes the date string'
do
expect
(
element
.
text
).
to
match
%r{2015-07-02
\d
{2}:
\d
{2}:
\d
{2}}
expect
(
element
.
text
).
to
eq
'2015-07-02 08:00:00 UTC'
end
it
'has a datetime attribute'
do
expect
(
element
.
attr
(
'datetime'
)).
to
eq
'2015-07-02T
12
:00:00Z'
expect
(
element
.
attr
(
'datetime'
)).
to
eq
'2015-07-02T
08
:00:00Z'
end
it
'has a formatted title attribute'
do
expect
(
element
.
attr
(
'title'
)).
to
eq
'Jul 02, 2015
12:00p
m'
expect
(
element
.
attr
(
'title'
)).
to
eq
'Jul 02, 2015
8:00a
m'
end
it
'includes a default js-timeago class'
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