Skip to content

Commit

Permalink
Set dummy app time_zone to Berlin
Browse files Browse the repository at this point in the history
In order to test timezone based features and issues
it makes sense to use a different one than UTC.
  • Loading branch information
tvdeyen committed Aug 29, 2024
1 parent 8d88024 commit 64d0258
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ class Application < Rails::Application
# Application configuration can go into files in config/initializers
# -- all .rb files in that directory are automatically loaded after loading
# the framework and any gems in your application.
config.time_zone = "Berlin"
end
end
4 changes: 2 additions & 2 deletions spec/libraries/forms/builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

it_behaves_like "datepicker expect" do
let(:type) { :date }
let(:value) { "2021-07-14T00:00:00Z" }
let(:value) { "2021-07-14T00:00:00+02:00" }
end
end

Expand All @@ -59,7 +59,7 @@

it_behaves_like "datepicker expect" do
let(:type) { :date }
let(:value) { "2021-08-01T00:00:00Z" }
let(:value) { "2021-08-01T00:00:00+02:00" }
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/models/alchemy/page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ module Alchemy
end

it "returns a cache version string" do
expect(page.cache_version).to eq("2018-12-31 12:00:00 UTC")
expect(page.cache_version).to eq("2018-12-31 13:00:00 +0100")
end
end

Expand Down Expand Up @@ -1479,7 +1479,7 @@ module Alchemy
end

it "returns value" do
is_expected.to eq("2016-11-01".to_time(:utc))
is_expected.to eq("2016-11-01".to_time)
end
end
end
Expand All @@ -1504,7 +1504,7 @@ module Alchemy
end

it "returns public_until from public version" do
is_expected.to eq("2016-11-01".to_time(:utc))
is_expected.to eq("2016-11-01".to_time)
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/serializers/alchemy/element_serializer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
it "includes all attributes" do
json = JSON.parse(subject)
expect(json).to eq(
"created_at" => element.created_at.strftime("%FT%T.%LZ"),
"created_at" => element.created_at.strftime("%FT%T.%L+02:00"),
"display_name" => element.display_name_with_preview_text,
"dom_id" => element.dom_id,
"id" => element.id,
Expand All @@ -21,7 +21,7 @@
"page_version_id" => element.page_version_id,
"position" => 1,
"tag_list" => [],
"updated_at" => element.updated_at.strftime("%FT%T.%LZ")
"updated_at" => element.updated_at.strftime("%FT%T.%L+02:00")
)
end
end

0 comments on commit 64d0258

Please sign in to comment.