mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 01:24:33 +08:00
Disable wizard invites step when local_logins are turned off
This commit is contained in:

committed by
Joffrey JAFFEUX

parent
34e4d82f1a
commit
f6fb079129
@ -27,4 +27,14 @@ describe Wizard::Builder do
|
||||
expect(wizard.steps).to be_blank
|
||||
end
|
||||
|
||||
it "returns wizard with disabled invites step when local_logins are off" do
|
||||
SiteSetting.enable_local_logins = false
|
||||
|
||||
wizard = Wizard::Builder.new(moderator).build
|
||||
|
||||
invites_step = wizard.steps.find { |s| s.id == "invites" }
|
||||
expect(invites_step.fields).to be_blank
|
||||
expect(invites_step.disabled).to be_truthy
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user