WIP: preserve failed Codex job issue-479-n7k8h8jk

このコミットが含まれているのは:
Codex Night Worker
2026-11-19 12:29:32 +09:00
コミット 98acbb6087
35個のファイルの変更、97行の追加、97行の削除
+6 -6
ファイルの表示
@@ -289,7 +289,7 @@ RSpec.describe 'Materials API', type: :request do
it 'returns 422 when tag is blank' do
post '/materials', params: { tag: ' ', file: dummy_upload }
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
expect(json.fetch('errors')).to include(
'tag' => ['タグは必須です.'])
end
@@ -297,7 +297,7 @@ RSpec.describe 'Materials API', type: :request do
it 'returns 422 when both file and url are blank' do
post '/materials', params: { tag: 'material_create_blank' }
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
expect(json.fetch('errors')).to include(
'file' => ['ファイルまたは URL は必須です.'],
'url' => ['ファイルまたは URL は必須です.'])
@@ -381,7 +381,7 @@ RSpec.describe 'Materials API', type: :request do
file: dummy_upload
}
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
end
it 'persists url-only material' do
@@ -424,7 +424,7 @@ RSpec.describe 'Materials API', type: :request do
}
end.not_to change(Material, :count)
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
expect(json.fetch('errors')).to include(
'file' => ['抑止された素材です: copyright_high_risk']
)
@@ -484,7 +484,7 @@ RSpec.describe 'Materials API', type: :request do
file: dummy_upload
}
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
expect(json.fetch('errors')).to include(
'tag' => ['タグは必須です.'])
end
@@ -695,7 +695,7 @@ RSpec.describe 'Materials API', type: :request do
file: dummy_upload(filename: 'blocked.png', body: 'blocked-update')
}
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
expect(material.reload.file.blob.filename.to_s).to eq('old.png')
end
end