mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 21:05:58 +08:00
FIX: Cleanup DiscoursePluginRegistry state after tests that use it
This was causing some heisentests
This commit is contained in:
parent
563253e9ed
commit
7f8cdea924
@ -40,6 +40,7 @@ describe Stylesheet::Compiler do
|
|||||||
after do
|
after do
|
||||||
Discourse.plugins.pop
|
Discourse.plugins.pop
|
||||||
Stylesheet::Importer.register_imports!
|
Stylesheet::Importer.register_imports!
|
||||||
|
DiscoursePluginRegistry.reset!
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not include theme variables in plugins" do
|
it "does not include theme variables in plugins" do
|
||||||
|
@ -68,7 +68,7 @@ describe Stylesheet::Manager do
|
|||||||
|
|
||||||
describe 'digest' do
|
describe 'digest' do
|
||||||
after do
|
after do
|
||||||
DiscoursePluginRegistry.stylesheets.delete "fake_file"
|
DiscoursePluginRegistry.reset!
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can correctly account for plugins in digest' do
|
it 'can correctly account for plugins in digest' do
|
||||||
|
@ -4,6 +4,10 @@ require 'rails_helper'
|
|||||||
describe ContentSecurityPolicy do
|
describe ContentSecurityPolicy do
|
||||||
before { ContentSecurityPolicy.base_url = nil }
|
before { ContentSecurityPolicy.base_url = nil }
|
||||||
|
|
||||||
|
after do
|
||||||
|
DiscoursePluginRegistry.reset!
|
||||||
|
end
|
||||||
|
|
||||||
describe 'report-uri' do
|
describe 'report-uri' do
|
||||||
it 'is enabled by SiteSetting' do
|
it 'is enabled by SiteSetting' do
|
||||||
SiteSetting.content_security_policy_collect_reports = true
|
SiteSetting.content_security_policy_collect_reports = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user