DEV: Update specs for new stylesheet location

DEV: Update specs for new stylesheet location

Followup to 75fc126224305644382fe4f8877d623d6aae5a06

diff --git a/spec/models/remote_theme_spec.rb b/spec/models/remote_theme_spec.rb
index efdf798..83d5a3f 100644
--- a/spec/models/remote_theme_spec.rb
+++ b/spec/models/remote_theme_spec.rb
@@ -11,7 +11,7 @@ describe RemoteTheme do
       `cd #{repo_dir} && git init . `
       `cd #{repo_dir} && git config user.email 'someone@cool.com'`
       `cd #{repo_dir} && git config user.name 'The Cool One'`
-      `cd #{repo_dir} && mkdir desktop mobile common assets locales scss`
+      `cd #{repo_dir} && mkdir desktop mobile common assets locales scss stylesheets`
       files.each do |name, data|
         File.write("#{repo_dir}/#{name}", data)
         `cd #{repo_dir} && git add #{name}`
@@ -48,8 +48,9 @@ describe RemoteTheme do
       setup_git_repo(
         "about.json" => about_json,
         "desktop/desktop.scss" => scss_data,
-        "scss/file.scss" => ".class1{color:red}",
-        "scss/empty.scss" => "",
+        "scss/oldpath.scss" => ".class2{color:blue}",
+        "stylesheets/file.scss" => ".class1{color:red}",
+        "stylesheets/empty.scss" => "",
         "common/header.html" => "I AM HEADER",
         "common/random.html" => "I AM SILLY",
         "common/embedded.scss" => "EMBED",
@@ -81,7 +82,7 @@ describe RemoteTheme do
       expect(remote.theme_version).to eq("1.0")
       expect(remote.minimum_discourse_version).to eq("1.0.0")
 
-      expect(@theme.theme_fields.length).to eq(7)
+      expect(@theme.theme_fields.length).to eq(8)
 
       mapped = Hash[*@theme.theme_fields.map { |f| ["#{f.target_id}-#{f.name}", f.value] }.flatten]
       expect(mapped["0-header"]).to eq("I AM HEADER")
@@ -94,7 +95,7 @@ describe RemoteTheme do
 
       expect(mapped["4-en"]).to eq("sometranslations")
 
-      expect(mapped.length).to eq(7)
+      expect(mapped.length).to eq(8)
 
       expect(@theme.settings.length).to eq(1)
       expect(@theme.settings.first.value).to eq(true)
@@ -115,7 +116,7 @@ describe RemoteTheme do
       `cd #{initial_repo} && git add settings.yml`
 
       File.delete("#{initial_repo}/settings.yaml")
-      File.delete("#{initial_repo}/scss/file.scss")
+      File.delete("#{initial_repo}/stylesheets/file.scss")
       `cd #{initial_repo} && git commit -am "update"`
 
       time = Time.new('2001')

GitHub sha: ff17177b

1 Like