Skip to content

Commit

Permalink
Use consistent time precision in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bdurand committed Nov 22, 2024
1 parent f8ab6f8 commit 92ae5b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/super_settings/rack_application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def current_user(request)

describe "last_updated_at" do
it "should have a REST endoint" do
time = Time.at(Time.now + 10.to_i)
time = SuperSettings::TimePrecision.new(Time.now + 10).time
setting_1.updated_at = time
setting_1.save!
response = middleware.call("REQUEST_METHOD" => "GET", "SCRIPT_NAME" => "/prefix/last_updated_at")
Expand Down
2 changes: 1 addition & 1 deletion spec/super_settings/rest_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def reload(setting)

describe "last_updated_at" do
it "should return the timestamp of the last updated setting" do
time = Time.at(Time.now + 10.to_i)
time = SuperSettings::TimePrecision.new(Time.now + 10).time
setting_1.updated_at = time
setting_1.save!
response = SuperSettings::RestAPI.last_updated_at
Expand Down

0 comments on commit 92ae5b3

Please sign in to comment.