mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 10:36:30 +08:00
33 lines
837 B
Ruby
33 lines
837 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
describe "Powered by Discourse", type: :system do
|
||
|
it "appears when enabled" do
|
||
|
SiteSetting.enable_powered_by_discourse = true
|
||
|
|
||
|
visit "/"
|
||
|
expect(page).to have_css(".powered-by-discourse")
|
||
|
end
|
||
|
|
||
|
it "does not appear on admin routes when enabled" do
|
||
|
SiteSetting.enable_powered_by_discourse = true
|
||
|
|
||
|
visit "/admin"
|
||
|
expect(page).not_to have_css(".powered-by-discourse")
|
||
|
end
|
||
|
|
||
|
it "does not appear on login required route when enabled" do
|
||
|
SiteSetting.enable_powered_by_discourse = true
|
||
|
SiteSetting.login_required = true
|
||
|
|
||
|
visit "/"
|
||
|
expect(page).not_to have_css(".powered-by-discourse")
|
||
|
end
|
||
|
|
||
|
it "does not appear when disabled" do
|
||
|
SiteSetting.enable_powered_by_discourse = false
|
||
|
|
||
|
visit "/"
|
||
|
expect(page).not_to have_css(".powered-by-discourse")
|
||
|
end
|
||
|
end
|