#215 テスト・ケース追加

This commit is contained in:
2026-01-12 17:49:20 +09:00
parent 74057cbce9
commit 8b55139f38
16 changed files with 170 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
FactoryBot.define do
factory :tag_name do
name { "tag-#{SecureRandom.hex(4)}" }
end
end
+12
View File
@@ -0,0 +1,12 @@
FactoryBot.define do
factory :tag do
category { 'general' }
post_count { 0 }
association :tag_name
trait :nico do
category { 'nico' }
tag_name { association(:tag_name, name: "nico:#{ SecureRandom.hex(4) }") }
end
end
end
+11
View File
@@ -0,0 +1,11 @@
FactoryBot.define do
factory :user do
name { "test-user" }
inheritance_code { SecureRandom.uuid }
role { "guest" }
trait :member do
role { "member" }
end
end
end