DEV: correct regression in registry test suite

DEV: correct regression in registry test suite

Previously we started with a non blank registry, new code blanks it out so we need to check for nils

diff --git a/spec/components/discourse_plugin_registry_spec.rb b/spec/components/discourse_plugin_registry_spec.rb
index a9104fa..bbb4f8e 100644
--- a/spec/components/discourse_plugin_registry_spec.rb
+++ b/spec/components/discourse_plugin_registry_spec.rb
@@ -170,16 +170,15 @@ describe DiscoursePluginRegistry do
     it "registers desktop css properly" do
       registry.register_asset("test.css", :desktop, plugin_directory_name)
 
-      expect(registry.mobile_stylesheets[plugin_directory_name].count).to eq(0)
       expect(registry.desktop_stylesheets[plugin_directory_name].count).to eq(1)
-      expect(registry.stylesheets[plugin_directory_name].count).to eq(0)
+      expect(registry.stylesheets[plugin_directory_name]).to eq(nil)
+      expect(registry.mobile_stylesheets[plugin_directory_name]).to eq(nil)
     end
 
     it "registers mobile css properly" do
       registry.register_asset("test.css", :mobile, plugin_directory_name)
-
       expect(registry.mobile_stylesheets[plugin_directory_name].count).to eq(1)
-      expect(registry.stylesheets[plugin_directory_name].count).to eq(0)
+      expect(registry.stylesheets[plugin_directory_name]).to eq(nil)
     end
 
     it "registers sass variable properly" do

GitHub sha: 7fe6d295

2 Likes

:+1: