A platform for community discussion. Free, open, simple.
Fix the build.
Guo Xiang Tan1b5d955a3464
diff --git a/spec/mailers/invite_mailer_spec.rb b/spec/mailers/invite_mailer_spec.rbindex 4bf13fddfda..dc1b60fe307 100644--- a/spec/mailers/invite_mailer_spec.rb+++ b/spec/mailers/invite_mailer_spec.rb@@ -78,7 +78,11 @@ describe InviteMailer dolet(: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, '[email protected]') }+ let(:invite) do+ topic.invite(topic.user, '[email protected]')+ 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 doendcontext "custom invite message" do- let(:invite) { topic.invite(topic.user, '[email protected]', nil, "Hey, I thought you might enjoy this topic!") }+ let(:invite) do+ topic.invite(+ topic.user,+ '[email protected]',+ nil,+ "Hey, I thought you might enjoy this topic!"+ )++ Invite.find_by(invited_by_id: topic.user.id)+ endlet(:custom_invite_mail) { InviteMailer.send_invite(invite) }it 'renders custom_message' dodiff --git a/spec/models/invite_spec.rb b/spec/models/invite_spec.rbindex c72ef714ed2..78e6d2c4db1 100644--- a/spec/models/invite_spec.rb+++ b/spec/models/invite_spec.rb@@ -329,9 +329,11 @@ describe Invite docontext 'invited to topics' dolet(:tl2_user) { Fabricate(:user, trust_level: 2) }let!(:topic) { Fabricate(:private_message_topic, user: tl2_user) }- let!(:invite) {++ let!(:invite) dotopic.invite(topic.user, '[email protected]')- }+ Invite.find_by(invited_by_id: topic.user)+ endcontext 'redeem topic invite' doit 'adds the user to the topic_users' do