Skip to content

Commit

Permalink
Test head (no-content)
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed Mar 25, 2024
1 parent 7a98af4 commit 1f9f861
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 9 additions & 2 deletions spec/rails/doc/smart/expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ paths:
summary: get
tags:
- Page
parameters:
- name: head
in: query
required: false
schema:
type: integer
example: 1
responses:
'200':
description: return HTML
Expand All @@ -27,8 +34,8 @@ paths:
schema:
type: string
example: '<!DOCTYPE html><html lang="en"><head><title>Hello</title></head><body>Hello</body></html>'
# '204':
# description: return no content
'204':
description: return no content
"/tables":
get:
summary: index
Expand Down
5 changes: 5 additions & 0 deletions spec/requests/rails_smart_merge_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,10 @@
get '/pages'
expect(response.status).to eq(200)
end

it 'return no content' do
get '/pages?head=1'
expect(response.status).to eq(204)
end
end
end

0 comments on commit 1f9f861

Please sign in to comment.