WIP: preserve failed Codex job issue-279-kofyff8r

このコミットが含まれているのは:
Codex Night Worker
2026-11-20 00:03:36 +09:00
コミット a1baaeb340
+10 -6
ファイルの表示
@@ -290,19 +290,23 @@ RSpec.describe 'Posts API', type: :request do
[:title, :url].each do |field|
context "when #{field} contains wildcards" do
let!(:search_posts) do
['needle%25end', 'needleX25end', 'needle_end', 'needleXend', 'needleABend'].map do |value|
Post.create!(uploaded_user: user, title: "prefix #{value} suffix",
url: "https://example.com/prefix-#{value}-suffix")
['needle%25end', 'needleX25end', 'needle_end', 'needleXend', 'needleABend', 'needle%25_end'].map.with_index do |value, index|
Post.create!(uploaded_user: user,
title: field == :title ? "prefix #{value} suffix" : 'url search post',
url: field == :url ? "https://example.com/prefix-#{value}-suffix" :
"https://example.com/title-search-#{index}")
end
end
{
'needle%25end' => [0],
'needle_end' => [2],
'needle*end' => [0, 1, 2, 3, 4],
'needle*end' => [0, 1, 2, 3, 4, 5],
'needle?end' => [2, 3],
'needle%*end' => [0],
'needle_?nd' => [2]
'needle%*end' => [0, 5],
'needle_?nd' => [2],
'needle%25_end' => [5],
'needle%25_*end' => [5]
}.each do |query, expected_indices|
it "matches #{query.inspect} using only * and ? as wildcards" do
get '/posts', params: { field => query }