diff options
Diffstat (limited to 'spec/models/environment_spec.rb')
-rw-r--r-- | spec/models/environment_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb index 2696d144db4..433ede97b82 100644 --- a/spec/models/environment_spec.rb +++ b/spec/models/environment_spec.rb @@ -854,8 +854,8 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching do end it 'overrides reactive_cache_limit_enabled? with a FF' do - environment_with_enabled_ff = FactoryBot.build(:environment) - environment_with_disabled_ff = FactoryBot.build(:environment) + environment_with_enabled_ff = build(:environment, project: create(:project)) + environment_with_disabled_ff = build(:environment, project: create(:project)) stub_feature_flags(reactive_caching_limit_environment: environment_with_enabled_ff.project) @@ -1222,7 +1222,7 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching do let(:environment) { build(:environment, :will_auto_stop) } it 'returns when it will expire' do - Timecop.freeze { is_expected.to eq(1.day.to_i) } + freeze_time { is_expected.to eq(1.day.to_i) } end end @@ -1248,7 +1248,7 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching do end with_them do it 'sets correct auto_stop_in' do - Timecop.freeze do + freeze_time do if expected_result.is_a?(Integer) || expected_result.nil? subject |