|
|
@ -30,8 +30,22 @@ RSpec.describe Organisation, type: :model do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "when the organisation only operates in specific local authorities" do |
|
|
|
context "when the organisation only operates in specific local authorities" do |
|
|
|
|
|
|
|
let(:ons_code_mappings) do |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"" => "Select an option", |
|
|
|
|
|
|
|
"E07000223" => "Adur", |
|
|
|
|
|
|
|
"E09000023" => "Lewisham", |
|
|
|
|
|
|
|
"E08000003" => "Manchester", |
|
|
|
|
|
|
|
"E07000178" => "Oxford", |
|
|
|
|
|
|
|
"E07000114" => "Thanet", |
|
|
|
|
|
|
|
"E09000033" => "Westminster", |
|
|
|
|
|
|
|
"E06000014" => "York" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
before do |
|
|
|
before do |
|
|
|
FactoryBot.create(:organisation_la, organisation_id: organisation.id, ons_code: "E07000178") |
|
|
|
FactoryBot.create(:organisation_la, organisation_id: organisation.id, ons_code: "E07000178") |
|
|
|
|
|
|
|
allow(LocalAuthority).to receive(:ons_code_mappings).and_return(ons_code_mappings) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "has local authorities associated" do |
|
|
|
it "has local authorities associated" do |
|
|
|