このコミットが含まれているのは:
2026-09-21 05:56:38 +09:00
コミット 694ed60431
+11 -4
ファイルの表示
@@ -80,18 +80,25 @@ RSpec.describe PostTag, type: :model do
end end
it 'does not load sections for another tag on the same post' do it 'does not load sections for another tag on the same post' do
post = create(:post) post_tag = create(:post_tag)
tag = create(:tag) post = post_tag.post
other_tag = create(:tag) other_tag = create(:tag)
post_tag = create(:post_tag, post:, tag:) own_section = create(:post_tag_section,
post:,
tag: post_tag.tag,
begin_ms: 1000,
end_ms: 2000)
create(:post_tag, post:, tag: other_tag)
create(:post_tag_section, create(:post_tag_section,
post:, post:,
tag: other_tag, tag: other_tag,
begin_ms: 1000, begin_ms: 1000,
end_ms: 2000) end_ms: 2000)
expect(post_tag.sections).to be_empty expect(post_tag.reload.sections).to contain_exactly(own_section)
end end
it 'allows open-ended sections' do it 'allows open-ended sections' do