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) }
|
let(:topic) { Fabricate(:topic, excerpt: "Topic invite support is now available in Discourse!", user: trust_level_2) }
|
||||||
|
|
||||||
context "default invite message" do
|
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) }
|
let(:invite_mail) { InviteMailer.send_invite(invite) }
|
||||||
|
|
||||||
it 'renders the invitee email' do
|
it 'renders the invitee email' do
|
||||||
|
@ -123,7 +127,16 @@ describe InviteMailer do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "custom invite message" do
|
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) }
|
let(:custom_invite_mail) { InviteMailer.send_invite(invite) }
|
||||||
|
|
||||||
it 'renders custom_message' do
|
it 'renders custom_message' do
|
||||||
|
|
|
@ -329,9 +329,11 @@ describe Invite do
|
||||||
context 'invited to topics' do
|
context 'invited to topics' do
|
||||||
let(:tl2_user) { Fabricate(:user, trust_level: 2) }
|
let(:tl2_user) { Fabricate(:user, trust_level: 2) }
|
||||||
let!(:topic) { Fabricate(:private_message_topic, user: tl2_user) }
|
let!(:topic) { Fabricate(:private_message_topic, user: tl2_user) }
|
||||||
let!(:invite) {
|
|
||||||
|
let!(:invite) do
|
||||||
topic.invite(topic.user, 'jake@adventuretime.ooo')
|
topic.invite(topic.user, 'jake@adventuretime.ooo')
|
||||||
}
|
Invite.find_by(invited_by_id: topic.user)
|
||||||
|
end
|
||||||
|
|
||||||
context 'redeem topic invite' do
|
context 'redeem topic invite' do
|
||||||
it 'adds the user to the topic_users' do
|
it 'adds the user to the topic_users' do
|
||||||
|
|
Loading…
Reference in New Issue