mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:38 -06:00
Fix the build.
This commit is contained in:
parent
07f928e05e
commit
1b5d955a34
@ -78,7 +78,11 @@ describe InviteMailer do
|
||||
let(:topic) { Fabricate(:topic, excerpt: "Topic invite support is now available in Discourse!", user: trust_level_2) }
|
||||
|
||||
context "default invite message" do
|
||||
let(:invite) { topic.invite(topic.user, 'name@example.com') }
|
||||
let(:invite) do
|
||||
topic.invite(topic.user, 'name@example.com')
|
||||
Invite.find_by(invited_by_id: topic.user.id)
|
||||
end
|
||||
|
||||
let(:invite_mail) { InviteMailer.send_invite(invite) }
|
||||
|
||||
it 'renders the invitee email' do
|
||||
@ -123,7 +127,16 @@ describe InviteMailer do
|
||||
end
|
||||
|
||||
context "custom invite message" do
|
||||
let(:invite) { topic.invite(topic.user, 'name@example.com', nil, "Hey, I thought you might enjoy this topic!") }
|
||||
let(:invite) do
|
||||
topic.invite(
|
||||
topic.user,
|
||||
'name@example.com',
|
||||
nil,
|
||||
"Hey, I thought you might enjoy this topic!"
|
||||
)
|
||||
|
||||
Invite.find_by(invited_by_id: topic.user.id)
|
||||
end
|
||||
let(:custom_invite_mail) { InviteMailer.send_invite(invite) }
|
||||
|
||||
it 'renders custom_message' do
|
||||
|
@ -329,9 +329,11 @@ describe Invite do
|
||||
context 'invited to topics' do
|
||||
let(:tl2_user) { Fabricate(:user, trust_level: 2) }
|
||||
let!(:topic) { Fabricate(:private_message_topic, user: tl2_user) }
|
||||
let!(:invite) {
|
||||
|
||||
let!(:invite) do
|
||||
topic.invite(topic.user, 'jake@adventuretime.ooo')
|
||||
}
|
||||
Invite.find_by(invited_by_id: topic.user)
|
||||
end
|
||||
|
||||
context 'redeem topic invite' do
|
||||
it 'adds the user to the topic_users' do
|
||||
|
Loading…
Reference in New Issue
Block a user