Skip to content

Commit 18de2d5

Browse files
committed
Refactor opportunities controller tests to separate one assert per test
1 parent 1c34ef8 commit 18de2d5

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

spec/controllers/opportunity_controlller_spec.rb

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22

33
RSpec.describe OpportunitiesController, type: :controller do
44

5-
it 'render #index' do
6-
get :index
7-
expect(response.status).to eq(200)
8-
expect(response).to render_template(['opportunities/index', 'layouts/jobs'])
9-
end
5+
describe "GET index" do
6+
it "should respond with 200" do
7+
get :index
8+
expect(response.status).to eq(200)
9+
end
1010

11+
it "should render the opportunities index template with jobs layout" do
12+
get :index
13+
expect(response).to render_template(['opportunities/index', 'layouts/jobs'])
14+
end
15+
end
1116
end

0 commit comments

Comments
 (0)