mirror of
https://github.com/mastodon/mastodon
synced 2024-11-27 22:38:27 +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
|
describe '#welcome' do
|
||||||
let(:mail) { described_class.welcome(receiver) }
|
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
|
it 'renders welcome mail' do
|
||||||
expect(mail)
|
expect(mail)
|
||||||
.to be_present
|
.to be_present
|
||||||
|
Loading…
Reference in New Issue
Block a user