mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +08:00
FIX: better handling of invite links after they are redeemed
FIX: deprecate invite_passthrough_hours setting
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user