Improve spec coverage for models/announcement
class (#28350)
This commit is contained in:
parent
d791b47058
commit
28e1a7a394
7 changed files with 227 additions and 4 deletions
6
spec/fabricators/announcement_mute_fabricator.rb
Normal file
6
spec/fabricators/announcement_mute_fabricator.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Fabricator(:announcement_mute) do
|
||||
announcement { Fabricate.build(:announcement) }
|
||||
account { Fabricate.build(:account) }
|
||||
end
|
7
spec/fabricators/announcement_reaction_fabricator.rb
Normal file
7
spec/fabricators/announcement_reaction_fabricator.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Fabricator(:announcement_reaction) do
|
||||
account { Fabricate.build(:account) }
|
||||
announcement { Fabricate.build(:announcement) }
|
||||
name { Fabricate(:custom_emoji).shortcode }
|
||||
end
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Fabricator(:custom_emoji) do
|
||||
shortcode 'coolcat'
|
||||
shortcode { sequence(:shortcode) { |i| "code_#{i}" } }
|
||||
domain nil
|
||||
image { Rails.root.join('spec', 'fixtures', 'files', 'emojo.png').open }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue