From 27bc01a05f4afbe009d03883a2594eb6ee9030d8 Mon Sep 17 00:00:00 2001 From: Lussier Date: Thu, 16 Jan 2025 16:04:52 -0500 Subject: [PATCH] Adding line coverage testing --- public/coverage | 1 + spec/controllers/works_controller_spec.rb | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 120000 public/coverage diff --git a/public/coverage b/public/coverage new file mode 120000 index 000000000..218788431 --- /dev/null +++ b/public/coverage @@ -0,0 +1 @@ +/home/cerberus/web/coverage \ No newline at end of file diff --git a/spec/controllers/works_controller_spec.rb b/spec/controllers/works_controller_spec.rb index fc682eeb9..d2abecc7b 100644 --- a/spec/controllers/works_controller_spec.rb +++ b/spec/controllers/works_controller_spec.rb @@ -31,4 +31,13 @@ expect(response).to render_template('works/new') end end -end + + describe 'edit' do + render_views + it 'renders the edit partial' do + get :edit, params: { id: work['id'] } + expect(response).to render_template('works/edit') + expect(CGI.unescapeHTML(response.body)).to include(work['title']) + end + end + end \ No newline at end of file