diff --git a/app/helpers/tag_helper.rb b/app/helpers/tag_helper.rb index 9283d94db..6682f97fd 100644 --- a/app/helpers/tag_helper.rb +++ b/app/helpers/tag_helper.rb @@ -8,8 +8,8 @@ module TagHelper completed: "Completed", active: "Active", incomplete: "Incomplete", - deactivates_soon: "Deactivates soon", - reactivates_soon: "Reactivates soon", + deactivating_soon: "Deactivating soon", + reactivating_soon: "Reactivating soon", deactivated: "Deactivated", }.freeze @@ -20,8 +20,8 @@ module TagHelper completed: "green", active: "green", incomplete: "red", - deactivates_soon: "yellow", - reactivates_soon: "blue", + deactivating_soon: "yellow", + reactivating_soon: "blue", deactivated: "grey", }.freeze diff --git a/app/models/location.rb b/app/models/location.rb index ae494f9d9..3b4a113ba 100644 --- a/app/models/location.rb +++ b/app/models/location.rb @@ -374,7 +374,7 @@ class Location < ApplicationRecord def status return :active if deactivation_date.blank? - return :deactivates_soon if Time.zone.now < deactivation_date + return :deactivating_soon if Time.zone.now < deactivation_date return :deactivated if Time.zone.now >= deactivation_date end diff --git a/app/models/scheme.rb b/app/models/scheme.rb index b12c1d450..e78a89318 100644 --- a/app/models/scheme.rb +++ b/app/models/scheme.rb @@ -216,7 +216,7 @@ class Scheme < ApplicationRecord def status return :active if deactivation_date.blank? - return :deactivates_soon if Time.zone.now < deactivation_date + return :deactivating_soon if Time.zone.now < deactivation_date return :deactivated if Time.zone.now >= deactivation_date end diff --git a/spec/models/location_spec.rb b/spec/models/location_spec.rb index 071c55ef6..8f9f452bc 100644 --- a/spec/models/location_spec.rb +++ b/spec/models/location_spec.rb @@ -125,10 +125,10 @@ RSpec.describe Location, type: :model do expect(location.status).to eq(:active) end - it "returns deactivates soon if deactivation_date is in the future" do + it "returns deactivating soon if deactivation_date is in the future" do location.deactivation_date = Time.zone.local(2022, 8, 8) location.save! - expect(location.status).to eq(:deactivates_soon) + expect(location.status).to eq(:deactivating_soon) end it "returns deactivated if deactivation_date is in the past" do diff --git a/spec/models/scheme_spec.rb b/spec/models/scheme_spec.rb index 253ca6925..b69629ba5 100644 --- a/spec/models/scheme_spec.rb +++ b/spec/models/scheme_spec.rb @@ -108,7 +108,7 @@ RSpec.describe Scheme, type: :model do it "returns deactivating soon if deactivation_date is in the future" do scheme.deactivation_date = Time.zone.local(2022, 8, 8) scheme.save! - expect(scheme.status).to eq(:deactivates_soon) + expect(scheme.status).to eq(:deactivating_soon) end it "returns deactivated if deactivation_date is in the past" do