summaryrefslogtreecommitdiff
path: root/spec/helpers/application_helper_spec.rb
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2017-03-05 16:15:25 +0000
committerJacob Schatz <jschatz@gitlab.com>2017-03-05 16:15:25 +0000
commit97330be9a52f84b2ced5b80a68e4a5bee47870ed (patch)
tree6c8aa5f6908644bac40f315e48cc72ef2ad838a5 /spec/helpers/application_helper_spec.rb
parent9f59101fb980dc264105814455d2553dde4fd174 (diff)
parenta9c80dceb688623e8f06a925caf629fddfa180ec (diff)
downloadgitlab-ce-97330be9a52f84b2ced5b80a68e4a5bee47870ed.tar.gz
Merge branch 'format-timeago-date' into 'master'
Formats timeago dates to be more friendly Closes #27537 See merge request !9145
Diffstat (limited to 'spec/helpers/application_helper_spec.rb')
-rw-r--r--spec/helpers/application_helper_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index 4ffdd530171..5c07ea8a872 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -193,8 +193,8 @@ describe ApplicationHelper do
describe 'time_ago_with_tooltip' do
def element(*arguments)
Time.zone = 'UTC'
- time = Time.zone.parse('2015-07-02 08:23')
- element = helper.time_ago_with_tooltip(time, *arguments)
+ @time = Time.zone.parse('2015-07-02 08:23')
+ element = helper.time_ago_with_tooltip(@time, *arguments)
Nokogiri::HTML::DocumentFragment.parse(element).first_element_child
end
@@ -204,7 +204,7 @@ describe ApplicationHelper do
end
it 'includes the date string' do
- expect(element.text).to eq '2015-07-02 08:23:00 UTC'
+ expect(element.text).to eq @time.strftime("%b %d, %Y")
end
it 'has a datetime attribute' do