Test: アカウント削除時のブックマーク・スタンプなど削除のテスト (#276)

This commit is contained in:
KMY(雪あすか) 2023-11-11 11:06:08 +09:00 committed by GitHub
parent 878936d4be
commit 2753d44563
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 65 additions and 4 deletions

View file

@ -0,0 +1,6 @@
# frozen_string_literal: true
Fabricator(:bookmark_category) do
account { Fabricate.build(:account) }
title 'MyString'
end

View file

@ -0,0 +1,9 @@
# frozen_string_literal: true
Fabricator(:bookmark_category_status) do
bookmark_category
status
before_create do |_bookmark_category_status, _|
Bookmark.create!(status: status, account: bookmark_category.account) unless bookmark_category.account.bookmarked?(status)
end
end