mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: Remove register_color_scheme
api (#28777)
This was added 10 years ago, but currently there's not a single use in our public and private plugins and no reference in third-party plugins on github
This commit is contained in:
@ -444,26 +444,6 @@ TEXT
|
||||
end
|
||||
end
|
||||
|
||||
describe "#register_color_scheme" do
|
||||
it "can add a color scheme for the first time" do
|
||||
plugin = Plugin::Instance.new nil, "/tmp/test.rb"
|
||||
expect {
|
||||
plugin.register_color_scheme("Purple", primary: "EEE0E5")
|
||||
plugin.notify_after_initialize
|
||||
}.to change { ColorScheme.count }.by(1)
|
||||
expect(ColorScheme.where(name: "Purple")).to be_present
|
||||
end
|
||||
|
||||
it "doesn't add the same color scheme twice" do
|
||||
Fabricate(:color_scheme, name: "Halloween")
|
||||
plugin = Plugin::Instance.new nil, "/tmp/test.rb"
|
||||
expect {
|
||||
plugin.register_color_scheme("Halloween", primary: "EEE0E5")
|
||||
plugin.notify_after_initialize
|
||||
}.to_not change { ColorScheme.count }
|
||||
end
|
||||
end
|
||||
|
||||
describe ".register_seedfu_fixtures" do
|
||||
it "should add the new path to SeedFu's fixtures path" do
|
||||
plugin = Plugin::Instance.new nil, "/tmp/test.rb"
|
||||
|
Reference in New Issue
Block a user