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

This commit is contained in:
Matt Jankowski authored and GitHub committed 2024-09-20 13:19:53 +00:00
1 parent 171394e914
commit d55f4fbda1
12 files changed
+188

No files matched your search

+24
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