diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-06-11 10:05:28 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-06-12 10:11:38 +0100 |
commit | 1524f83baa3b93a506dbefe7def0c4c304f93745 (patch) | |
tree | 0cb741772e90a77fa7d79f9d0cf743f78b5e95a9 /spec/controllers/admin_public_body_controller_spec.rb | |
parent | 3efe2f333a9b143e88556c0aeedb534090eb41d3 (diff) |
Move updating of derived attributes to a concern.
Add spec to demonstrate that admin-added bodies aren't getting derived attributes.
Add a spec to demonstrate the problem setting the first letter for translations.
Demonstrate failure to update derived attributes in translations.
Diffstat (limited to 'spec/controllers/admin_public_body_controller_spec.rb')
-rw-r--r-- | spec/controllers/admin_public_body_controller_spec.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/controllers/admin_public_body_controller_spec.rb b/spec/controllers/admin_public_body_controller_spec.rb index 1b960ccc3..f7336a6c7 100644 --- a/spec/controllers/admin_public_body_controller_spec.rb +++ b/spec/controllers/admin_public_body_controller_spec.rb @@ -129,7 +129,8 @@ describe AdminPublicBodyController, "when creating a public body" do :last_edit_comment => 'From test code', :translations_attributes => { 'es' => { :locale => 'es', - :name => 'Los Quango' } + :name => 'Los Quango', + :short_name => 'lq' } } } } end @@ -160,6 +161,8 @@ describe AdminPublicBodyController, "when creating a public body" do I18n.with_locale(:es) do expect(body.name).to eq('Los Quango') + expect(body.url_name).to eq('lq') + expect(body.first_letter).to eq('L') end end |