Test: アカウント削除時のブックマーク・スタンプなど削除のテスト (#276)
This commit is contained in:
parent
878936d4be
commit
2753d44563
6 changed files with 65 additions and 4 deletions
6
spec/fabricators/bookmark_category_fabricator.rb
Normal file
6
spec/fabricators/bookmark_category_fabricator.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Fabricator(:bookmark_category) do
|
||||
account { Fabricate.build(:account) }
|
||||
title 'MyString'
|
||||
end
|
9
spec/fabricators/bookmark_category_status_fabricator.rb
Normal file
9
spec/fabricators/bookmark_category_status_fabricator.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue