|
|
|
|
@ -119,6 +119,10 @@ RSpec.describe Location, type: :model do
|
|
|
|
|
Timecop.freeze(2022, 6, 7) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
after do |
|
|
|
|
Timecop.unfreeze |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "when location is missing some mandatory information" do |
|
|
|
|
it "returns incomplete when the postcode is missing" do |
|
|
|
|
location.postcode = nil |
|
|
|
|
@ -147,10 +151,6 @@ RSpec.describe Location, type: :model do
|
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
after do |
|
|
|
|
Timecop.unfreeze |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "when there have not been any previous deactivations" do |
|
|
|
|
it "returns active if the location has no deactivation records" do |
|
|
|
|
expect(location.status).to eq(:active) |
|
|
|
|
|