diff options
Diffstat (limited to 'spec/models/public_body_spec.rb')
-rw-r--r-- | spec/models/public_body_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/public_body_spec.rb b/spec/models/public_body_spec.rb index 09edb395f..07e8f291d 100644 --- a/spec/models/public_body_spec.rb +++ b/spec/models/public_body_spec.rb @@ -226,6 +226,18 @@ describe PublicBody, "when searching" do end end +describe PublicBody, " when dealing public body locales" do + it "shouldn't fail if it internal_admin_body was created in a locale other than the default" do + # first time, do it with the non-default locale + PublicBody.with_locale(:es) do + PublicBody.internal_admin_body + end + + # second time + lambda {PublicBody.internal_admin_body }.should_not raise_error(ActiveRecord::RecordInvalid) + end +end + describe PublicBody, " when loading CSV files" do before(:each) do # InternalBody is created the first time it's accessed, which happens sometimes during imports, |