mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 17:40:43 +08:00
DEV: Avoid $
globals (#15453)
Also: * Remove an unused method (#fill_email) * Replace a method that was used just once (#generate_username) with `SecureRandom.alphanumeric` * Remove an obsolete dev puma `tmp/restart` file logic
This commit is contained in:
@ -19,24 +19,6 @@ RSpec.describe ForumsController do
|
||||
end
|
||||
end
|
||||
|
||||
describe "during shutdown" do
|
||||
before(:each) do
|
||||
$shutdown = true
|
||||
end
|
||||
after(:each) do
|
||||
$shutdown = nil
|
||||
end
|
||||
|
||||
it "returns a 500 response" do
|
||||
get "/srv/status"
|
||||
expect(response.status).to eq(500)
|
||||
end
|
||||
it "returns a 200 response when given shutdown_ok" do
|
||||
get "/srv/status?shutdown_ok=1"
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
end
|
||||
|
||||
describe "cluster parameter" do
|
||||
it "returns a 500 response if the cluster is not configured" do
|
||||
get "/srv/status?cluster=abc"
|
||||
|
Reference in New Issue
Block a user