FIX: better handling of invite links after they are redeemed

FIX: deprecate invite_passthrough_hours setting
This commit is contained in:
Arpit Jalan
2018-05-08 20:12:58 +05:30
parent edb97edf5f
commit 83245aa508
10 changed files with 56 additions and 58 deletions

View File

@ -301,25 +301,8 @@ describe Invite do
end
context 'again' do
context "without a passthrough" do
before do
SiteSetting.invite_passthrough_hours = 0
end
it 'will not redeem twice' do
expect(invite.redeem).to be_blank
end
end
context "with a passthrough" do
before do
SiteSetting.invite_passthrough_hours = 1
end
it 'will not redeem twice' do
expect(invite.redeem).to be_present
expect(invite.redeem.email).to eq(user.email)
end
it 'will not redeem twice' do
expect(invite.redeem).to be_blank
end
end
end