mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
Track steps the user has completed, nag them to finish it.
This commit is contained in:
@ -2,6 +2,10 @@ require 'rails_helper'
|
||||
|
||||
describe StepsController do
|
||||
|
||||
before do
|
||||
SiteSetting.wizard_enabled = true
|
||||
end
|
||||
|
||||
it 'needs you to be logged in' do
|
||||
expect {
|
||||
xhr :put, :update, id: 'made-up-id', fields: { forum_title: "updated title" }
|
||||
@ -19,6 +23,12 @@ describe StepsController do
|
||||
log_in(:admin)
|
||||
end
|
||||
|
||||
it "raises an error if the wizard is disabled" do
|
||||
SiteSetting.wizard_enabled = false
|
||||
xhr :put, :update, id: 'contact', fields: { contact_email: "eviltrout@example.com" }
|
||||
expect(response).to be_forbidden
|
||||
end
|
||||
|
||||
it "updates properly if you are staff" do
|
||||
xhr :put, :update, id: 'contact', fields: { contact_email: "eviltrout@example.com" }
|
||||
expect(response).to be_success
|
||||
|
Reference in New Issue
Block a user