2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

added a test for safe mode

This commit is contained in:
Sam 2016-11-23 13:31:05 +11:00
parent 9afa55a3fd
commit bfd0418f07

View file

@ -313,4 +313,24 @@ describe ListController do
end
describe "safe mode" do
render_views
it "handles safe mode" do
get :latest
expect(response.body).to match(/plugin\.js/)
expect(response.body).to match(/plugin-third-party\.js/)
get :latest, safe_mode: "no_plugins"
expect(response.body).not_to match(/plugin\.js/)
expect(response.body).not_to match(/plugin-third-party\.js/)
get :latest, safe_mode: "only_official"
expect(response.body).to match(/plugin\.js/)
expect(response.body).not_to match(/plugin-third-party\.js/)
end
end
end