File tree 1 file changed +3
-3
lines changed
lib/generators/rspec/scaffold/templates
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 82
82
}.to change(<%= class_name %>, :count).by(0)
83
83
end
84
84
85
- it "renders a successful response (i.e. to display the 'new' template) " do
85
+ it "renders a response with 422 status - unporcessable entity " do
86
86
post <%= index_helper %>_url, params: { <%= ns_file_name %>: invalid_attributes }
87
- expect(response).to be_successful
87
+ expect(response.status ).to eq(422)
88
88
end
89
89
end
90
90
end
114
114
it "renders a successful response (i.e. to display the 'edit' template)" do
115
115
<%= file_name %> = <%= class_name %>.create! valid_attributes
116
116
patch <%= show_helper.tr('@', '') %>, params: { <%= singular_table_name %>: invalid_attributes }
117
- expect(response).to be_successful
117
+ expect(response.status ).to eq(422)
118
118
end
119
119
end
120
120
end
You can’t perform that action at this time.
0 commit comments