baarkerlounger
3 years ago
5 changed files with 28 additions and 5 deletions
@ -0,0 +1,5 @@
|
||||
class LocalAuthority |
||||
def self.ons_code_mappings |
||||
FormHandler.instance.forms["2021_2022"].get_question("la", nil).answer_options |
||||
end |
||||
end |
@ -0,0 +1,10 @@
|
||||
require "rails_helper" |
||||
|
||||
RSpec.describe LocalAuthority, type: :model do |
||||
describe "ons code mapping" do |
||||
it "maps ONS code to local authority names" do |
||||
expect(described_class.ons_code_mappings).to be_a(Hash) |
||||
expect(described_class.ons_code_mappings["E07000178"]).to eq("Oxford") |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue