diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-11-17 14:45:40 +0000 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-11-17 14:45:40 +0000 |
commit | 446b7eec3e3f2b9555831e2f1d85cd4f68178156 (patch) | |
tree | 5fc28cd09c38ab01d4488f845d5aa91c1c433b48 | |
parent | c377db9384456809d5aca1fc313b3b2c9cc8ba56 (diff) |
Add coverage to ensure ‘new’ templates are rendered
-rw-r--r-- | spec/controllers/admin_public_body_categories_controller_spec.rb | 6 | ||||
-rw-r--r-- | spec/controllers/admin_public_body_headings_controller_spec.rb | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/spec/controllers/admin_public_body_categories_controller_spec.rb b/spec/controllers/admin_public_body_categories_controller_spec.rb index d47a0edc4..6eadb7971 100644 --- a/spec/controllers/admin_public_body_categories_controller_spec.rb +++ b/spec/controllers/admin_public_body_categories_controller_spec.rb @@ -15,6 +15,12 @@ describe AdminPublicBodyCategoriesController do get :new assigns[:category].should be_a(PublicBodyCategory) end + + it 'renders the new template' do + get :new + expect(response).to render_template('new') + end + end context 'when creating a public body category' do diff --git a/spec/controllers/admin_public_body_headings_controller_spec.rb b/spec/controllers/admin_public_body_headings_controller_spec.rb index 9c4ea3855..d8a78daff 100644 --- a/spec/controllers/admin_public_body_headings_controller_spec.rb +++ b/spec/controllers/admin_public_body_headings_controller_spec.rb @@ -7,6 +7,11 @@ describe AdminPublicBodyHeadingsController do get :new assigns[:heading].should be_a(PublicBodyHeading) end + + it 'renders the new template' do + get :new + expect(response).to render_template('new') + end end context 'when creating a public body heading' do |