We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d17ed92 commit 72b4495Copy full SHA for 72b4495
1 file changed
test/integration/requests/request_test.rb
@@ -156,6 +156,30 @@ def test_post_single
156
assert_equal 201, status
157
end
158
159
+ def test_post_single_missing_data_contents
160
+ post '/posts',
161
+ {
162
+ 'data' => {
163
+ }
164
+ }.to_json, "CONTENT_TYPE" => JSONAPI::MEDIA_TYPE
165
+
166
+ assert_equal 400, status
167
+ end
168
169
+ def test_post_single_minimal_valid
170
+ post '/comments',
171
172
173
+ 'type' => 'comments'
174
175
176
177
+ assert_equal 201, status
178
+ assert_nil json_response['data']['body']
179
+ assert_nil json_response['data']['links']['post']['linkage']
180
+ assert_nil json_response['data']['links']['author']['linkage']
181
182
183
def test_post_single_minimal_invalid
184
post '/posts',
185
{
0 commit comments