File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
generators/rspec/scaffold/templates Expand file tree Collapse file tree 2 files changed +16
-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
Original file line number Diff line number Diff line change
1
+ module RSpec
2
+ module Rails
3
+ # Version information for RSpec Rails.
4
+ module Version
5
+ # Current version of RSpec Rails, in semantic versioning format.
6
+ <<<<<<< HEAD
7
+ STRING = '4.0.1'
8
+ =======
9
+ STRING = '4.0.0.pre'
10
+ >>>>>>> 115f1cc6... Follow pre versioning format
11
+ end
12
+ end
13
+ end
You can’t perform that action at this time.
0 commit comments