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