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 94
94
it "updates the requested <%= ns_file_name %>" do
95
95
<%= file_name %> = <%= class_name %>.create! valid_attributes
96
96
patch <%= show_helper.tr('@', '') %>,
97
- params: { <%= singular_table_name %>: invalid_attributes }, headers: valid_headers, as: :json
97
+ params: { <%= singular_table_name %>: new_attributes }, headers: valid_headers, as: :json
98
98
<%= file_name %>.reload
99
99
skip("Add assertions for updated state")
100
100
end
101
101
102
102
it "renders a JSON response with the <%= ns_file_name %>" do
103
103
<%= file_name %> = <%= class_name %>.create! valid_attributes
104
104
patch <%= show_helper.tr('@', '') %>,
105
- params: { <%= singular_table_name %>: invalid_attributes }, headers: valid_headers, as: :json
105
+ params: { <%= singular_table_name %>: new_attributes }, headers: valid_headers, as: :json
106
106
expect(response).to have_http_status(:ok)
107
- expect(response.content_type).to eq( "application/json")
107
+ expect(response.content_type).to match(a_string_including( "application/json") )
108
108
end
109
109
end
110
110
You can’t perform that action at this time.
0 commit comments