0
0
Fork 0

Add content type checks to api/v2 request specs (#31983)

This commit is contained in:
Matt Jankowski 2024-09-20 09:19:53 -04:00 committed by GitHub
parent 171394e914
commit d55f4fbda1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 188 additions and 0 deletions

View file

@ -18,6 +18,8 @@ RSpec.describe '/api/web/embed' do
subject
expect(response).to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body[:html]).to be_present
end
end
@ -29,6 +31,8 @@ RSpec.describe '/api/web/embed' do
subject
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
end
@ -42,6 +46,8 @@ RSpec.describe '/api/web/embed' do
subject
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
@ -52,6 +58,8 @@ RSpec.describe '/api/web/embed' do
subject
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
end
@ -71,6 +79,8 @@ RSpec.describe '/api/web/embed' do
subject
expect(response).to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body[:html]).to be_present
end
@ -83,6 +93,8 @@ RSpec.describe '/api/web/embed' do
subject
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
end
@ -98,6 +110,8 @@ RSpec.describe '/api/web/embed' do
subject
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
end
@ -123,6 +137,8 @@ RSpec.describe '/api/web/embed' do
subject
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
@ -133,6 +149,8 @@ RSpec.describe '/api/web/embed' do
subject
expect(response).to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body[:html]).to be_present
end
end
@ -146,6 +164,8 @@ RSpec.describe '/api/web/embed' do
subject
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
@ -156,6 +176,8 @@ RSpec.describe '/api/web/embed' do
subject
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
end
@ -167,6 +189,8 @@ RSpec.describe '/api/web/embed' do
subject
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
end