diff --git a/spec/super_settings/rack_application_spec.rb b/spec/super_settings/rack_application_spec.rb index d760149..6e3f6df 100644 --- a/spec/super_settings/rack_application_spec.rb +++ b/spec/super_settings/rack_application_spec.rb @@ -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") diff --git a/spec/super_settings/rest_api_spec.rb b/spec/super_settings/rest_api_spec.rb index 02e7170..401fcf6 100644 --- a/spec/super_settings/rest_api_spec.rb +++ b/spec/super_settings/rest_api_spec.rb @@ -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