DEV: correct regression and correct tests

DEV: correct regression and correct tests

etag change in 31976ecf was incorrect, revert it

Also correct regression in test suite.

diff --git a/lib/s3_inventory.rb b/lib/s3_inventory.rb
index 06265ff..c587fb4 100644
--- a/lib/s3_inventory.rb
+++ b/lib/s3_inventory.rb
@@ -59,7 +59,6 @@ class S3Inventory
               SET etag = #{table_name}.etag
               FROM #{table_name}
               WHERE #{model.table_name}.etag IS NULL AND
-                #{model.table_name}.etag <> #{table_name}.etag AND
                 #{model.table_name}.url = #{table_name}.url")
 
             list_missing_post_uploads if type == "original"
diff --git a/spec/integration/email_style_spec.rb b/spec/integration/email_style_spec.rb
index 42203ec..f0844db 100644
--- a/spec/integration/email_style_spec.rb
+++ b/spec/integration/email_style_spec.rb
@@ -71,6 +71,8 @@ describe EmailStyle do
       subject(:mail_html) { Email::Renderer.new(mail).html }
 
       it "customizations are applied to html part of emails" do
+        SiteSetting.default_email_in_reply_to = true
+
         expect(mail_html.scan('<h1 style="color: red;">FOR YOU</h1>').count).to eq(1)
         matches = mail_html.match(/<div style="([^"]+)">#{post.raw}/)
         expect(matches[1]).to include('color: #FAB;') # custom
diff --git a/spec/mailers/user_notifications_spec.rb b/spec/mailers/user_notifications_spec.rb
index 90f6535..38a7955 100644
--- a/spec/mailers/user_notifications_spec.rb
+++ b/spec/mailers/user_notifications_spec.rb
@@ -253,6 +253,8 @@ describe UserNotifications do
 
     it 'generates a correct email' do
 
+      SiteSetting.default_email_in_reply_to = true
+
       # Fabricator is not fabricating this ...
       SiteSetting.email_subject = "[%{site_name}] %{optional_pm}%{optional_cat}%{optional_tags}%{topic_title}"
       SiteSetting.enable_names = true
diff --git a/spec/requests/admin/site_settings_controller_spec.rb b/spec/requests/admin/site_settings_controller_spec.rb
index 1b74fb9..e01752f 100644
--- a/spec/requests/admin/site_settings_controller_spec.rb
+++ b/spec/requests/admin/site_settings_controller_spec.rb
@@ -58,15 +58,18 @@ describe Admin::SiteSettingsController do
         let!(:user2) { Fabricate(:user) }
 
         it 'should update all existing user options' do
-          user2.user_option.email_in_reply_to = false
+          SiteSetting.default_email_in_reply_to = true
+
+          user2.user_option.email_in_reply_to = true
           user2.user_option.save!
 
-          expect {
-            put "/admin/site_settings/default_email_in_reply_to.json", params: {
-              default_email_in_reply_to: false,
-              updateExistingUsers: true
-            }
-          }.to change { UserOption.where(email_in_reply_to: false).count }.by(User.count - 1)
+          put "/admin/site_settings/default_email_in_reply_to.json", params: {
+            default_email_in_reply_to: false,
+            updateExistingUsers: true
+          }
+
+          user2.reload
+          expect(user2.user_option.email_in_reply_to).to eq(false)
         end
 
         it 'should not update existing user options' do

GitHub sha: 38a30a6e

1 Like