|
|
|
@ -156,10 +156,15 @@ RSpec.describe Imports::SchemeLocationImportService do |
|
|
|
expect(location.scheme.primary_client_group).to eq("Older people with support needs") |
|
|
|
expect(location.scheme.primary_client_group).to eq("Older people with support needs") |
|
|
|
expect(location.scheme.secondary_client_group).to be_nil |
|
|
|
expect(location.scheme.secondary_client_group).to be_nil |
|
|
|
expect(location.scheme.sensitive).to eq("No") |
|
|
|
expect(location.scheme.sensitive).to eq("No") |
|
|
|
expect(location.scheme.end_date).to eq("2050-12-31") |
|
|
|
|
|
|
|
expect(location.scheme.confirmed).to be_truthy |
|
|
|
expect(location.scheme.confirmed).to be_truthy |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "creates a deactivation period" do |
|
|
|
|
|
|
|
location = location_service.create_scheme_location(location_xml) |
|
|
|
|
|
|
|
expect(location.location_deactivation_periods.count).to eq(1) |
|
|
|
|
|
|
|
expect(location.location_deactivation_periods.first.deactivation_date).to eq(Time.zone.local(2050, 12, 31)) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "and we import the same location twice" do |
|
|
|
context "and we import the same location twice" do |
|
|
|
before { location_service.create_scheme_location(location_xml) } |
|
|
|
before { location_service.create_scheme_location(location_xml) } |
|
|
|
|
|
|
|
|
|
|
|
|