mirror of
https://github.com/mastodon/mastodon
synced 2024-11-23 22:56:20 +09:00
Add stub for trending tags in user mailer spec (#29850)
This commit is contained in:
parent
601834d746
commit
1f11aa5f04
@ -247,6 +247,12 @@ describe UserMailer do
|
||||
describe '#welcome' do
|
||||
let(:mail) { described_class.welcome(receiver) }
|
||||
|
||||
before do
|
||||
# This is a bit hacky and low-level but this allows stubbing trending tags
|
||||
tag_ids = Fabricate.times(5, :tag).pluck(:id)
|
||||
allow(Trends.tags).to receive(:query).and_return(instance_double(Trends::Query, allowed: Tag.where(id: tag_ids)))
|
||||
end
|
||||
|
||||
it 'renders welcome mail' do
|
||||
expect(mail)
|
||||
.to be_present
|
||||
|
Loading…
Reference in New Issue
Block a user