このコミットが含まれているのは:
2026-07-03 02:58:10 +09:00
コミット 881e940e24
4個のファイルの変更30行の追加7行の削除
+16
ファイルの表示
@@ -898,6 +898,22 @@ RSpec.describe 'Posts API', type: :request do
expect(json.fetch('video_ms')).to eq(180_500)
end
it 'creates a video post with number input duration seconds' do
sign_in_as(member)
post '/posts', params: post_write_params(
title: 'video post seconds',
url: 'https://example.com/video-post-seconds',
tags: '動画 spec_tag',
duration: '180.5',
thumbnail: dummy_upload
)
expect(response).to have_http_status(:created)
expect(Post.find(json.fetch('id')).video_ms).to eq(180_500)
expect(json.fetch('video_ms')).to eq(180_500)
end
it 'clears video_ms when the saved tags do not include 動画' do
sign_in_as(member)