このコミットが含まれているのは:
@@ -50,6 +50,19 @@ RSpec.describe PostCreatePlan do
|
||||
expect(plan[:video_ms]).to eq(60_000)
|
||||
end
|
||||
|
||||
it 'rejects direct external tag input without creating internal records' do
|
||||
create(:external_tag, name: 'reserved')
|
||||
counts = [Tag.count, TagName.count, ExternalTag.count]
|
||||
|
||||
expect {
|
||||
described_class.new(attributes: { tags: 'NiCo:reserved' }).build!
|
||||
}.to raise_error(ActiveRecord::RecordInvalid) { |error|
|
||||
expect(error.record.errors[:tags]).to be_present
|
||||
}
|
||||
|
||||
expect([Tag.count, TagName.count, ExternalTag.count]).to eq(counts)
|
||||
end
|
||||
|
||||
it 'validates a new tag name without persisting it' do
|
||||
long_name = 'a' * 256
|
||||
counts = [TagName.count, Tag.count]
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする