Skip to content

Commit

Permalink
Check optional field in top-level
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed Mar 27, 2024
1 parent deb815b commit 54e6965
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 0 additions & 2 deletions spec/rails/doc/smart/expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -413,5 +413,3 @@ components:
type: integer
required:
- bar
required:
- name
6 changes: 6 additions & 0 deletions spec/requests/rails_smart_merge_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@
}.to_json
expect(response.status).to eq(201)
end

it 'can accept empty body' do
post '/users', headers: { authorization: 'k0kubun', 'Content-Type': 'application/json' }, params: {

Check notice

Code scanning / Rubocop

Use spaces inside hash literal braces - or don't. Note test

Layout/SpaceInsideHashLiteralBraces: Space inside empty hash literal braces detected.
}.to_json
expect(response.status).to eq(201)
end
end

describe '#show' do
Expand Down

0 comments on commit 54e6965

Please sign in to comment.