mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FEATURE: out-of-the-box dark/light user selectable themes
This commit is contained in:
30
spec/components/wizard/wizard_builder_spec.rb
Normal file
30
spec/components/wizard/wizard_builder_spec.rb
Normal file
@ -0,0 +1,30 @@
|
||||
require 'rails_helper'
|
||||
require 'wizard'
|
||||
require 'wizard/builder'
|
||||
|
||||
describe Wizard::Builder do
|
||||
let(:moderator) { Fabricate.build(:moderator) }
|
||||
|
||||
it "returns a wizard with steps when enabled" do
|
||||
SiteSetting.wizard_enabled = true
|
||||
|
||||
wizard = Wizard::Builder.new(moderator).build
|
||||
expect(wizard).to be_present
|
||||
expect(wizard.steps).to be_present
|
||||
end
|
||||
|
||||
it "returns a wizard without steps when enabled, but not staff" do
|
||||
wizard = Wizard::Builder.new(Fabricate.build(:user)).build
|
||||
expect(wizard).to be_present
|
||||
expect(wizard.steps).to be_blank
|
||||
end
|
||||
|
||||
it "returns a wizard without steps when disabled" do
|
||||
SiteSetting.wizard_enabled = false
|
||||
|
||||
wizard = Wizard::Builder.new(moderator).build
|
||||
expect(wizard).to be_present
|
||||
expect(wizard.steps).to be_blank
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user