Fix serialization error with video_thumbnail_url (#5933)
This commit is contained in:
parent
a972c8b892
commit
92f6a9f007
2 changed files with 10 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ module Api
|
|||
title description main_image published_at crossposted_at social_image
|
||||
cached_tag_list slug path canonical_url comments_count
|
||||
positive_reactions_count created_at edited_at last_comment_at published
|
||||
updated_at
|
||||
updated_at video_thumbnail_url
|
||||
].freeze
|
||||
private_constant :INDEX_ATTRIBUTES_FOR_SERIALIZATION
|
||||
|
||||
|
|
|
|||
|
|
@ -240,6 +240,15 @@ RSpec.describe "Api::V0::Articles", type: :request do
|
|||
expect(response.headers["surrogate-key"].split.to_set).to eq(expected_key)
|
||||
end
|
||||
end
|
||||
|
||||
context "with regression tests" do
|
||||
it "works if both the social image and the main image are missing" do
|
||||
article.update_columns(social_image: nil, main_image: nil)
|
||||
|
||||
get api_articles_path
|
||||
expect(response).to have_http_status(:ok)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET /api/articles/:id" do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue