Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

SD-899 Update specs with timezone

Krzysztof Kaliszbecd536bceec
diff --git a/backend/spec/helpers/spree/admin/base_helper_spec.rb b/backend/spec/helpers/spree/admin/base_helper_spec.rb
index 96bdf03936..1cab0ac100 100644
--- a/backend/spec/helpers/spree/admin/base_helper_spec.rb
+++ b/backend/spec/helpers/spree/admin/base_helper_spec.rb
@@ -24,7 +24,8 @@ describe Spree::Admin::BaseHelper, type: :helper do
context '#order_time' do
it 'prints in a format' do
- expect(order_time(Time.new(2016, 5, 6, 13, 33))).to eq '2016-05-06 1:33 PM'
+ time = Time.new(2016, 5, 6, 13, 33)
+ expect(order_time(time)).to eq "2016-05-06 1:33 PM #{time.zone}"
end
it 'return empty stirng when nil is supplied' do
diff --git a/core/spec/helpers/base_helper_spec.rb b/core/spec/helpers/base_helper_spec.rb
index 3a761cfe9e..3114d733ba 100644
--- a/core/spec/helpers/base_helper_spec.rb
+++ b/core/spec/helpers/base_helper_spec.rb
@@ -125,7 +125,8 @@ describe Spree::BaseHelper, type: :helper do
context 'pretty_time' do
it 'prints in a format' do
- expect(pretty_time(Time.new(2012, 5, 6, 13, 33))).to eq 'May 06, 2012 1:33 PM'
+ time = Time.new(2012, 5, 6, 13, 33)
+ expect(pretty_time(time)).to eq "May 06, 2012 1:33 PM #{time.zone}"
end
it 'return empty stirng when nil is supplied' do