Skip to content

Commit e2d6c3f

Browse files
committed
check if tests will pass for older rails too
1 parent 620633f commit e2d6c3f

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

lib/generators/rspec/scaffold/templates/request_spec.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,10 @@
8282
}.to change(<%= class_name %>, :count).by(0)
8383
end
8484
85-
<% if Rails.version.to_f < 6.1 || Rails.version == '6.1.0' %>
8685
it "renders a successful response (i.e. to display the 'new' template)" do
8786
post <%= index_helper %>_url, params: { <%= ns_file_name %>: invalid_attributes }
8887
expect(response).to be_successful
8988
end
90-
<% else %>
91-
it "renders a response with 422 status - unporcessable entity" do
92-
post <%= index_helper %>_url, params: { <%= ns_file_name %>: invalid_attributes }
93-
expect(response.status).to eq(422)
94-
end
95-
<% end %>
9689
end
9790
end
9891

0 commit comments

Comments
 (0)