mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: bypass wizard check after 15 topics are created
This commit is contained in:
@@ -120,6 +120,23 @@ describe Wizard do
|
||||
expect(build_simple(admin).requires_completion?).to eq(false)
|
||||
end
|
||||
|
||||
it "its false when the wizard is bypassed" do
|
||||
SiteSetting.bypass_wizard_check = true
|
||||
admin = Fabricate(:admin)
|
||||
expect(build_simple(admin).requires_completion?).to eq(false)
|
||||
end
|
||||
|
||||
it "its automatically bypasses after you reach topic limit" do
|
||||
Fabricate(:topic)
|
||||
admin = Fabricate(:admin)
|
||||
wizard = build_simple(admin)
|
||||
|
||||
wizard.max_topics_to_require_completion = Topic.count-1
|
||||
|
||||
expect(wizard.requires_completion?).to eq(false)
|
||||
expect(SiteSetting.bypass_wizard_check).to eq(true)
|
||||
end
|
||||
|
||||
it "it's true for the first admin who logs in" do
|
||||
admin = Fabricate(:admin)
|
||||
second_admin = Fabricate(:admin)
|
||||
|
||||
Reference in New Issue
Block a user