DEV: correct regression and correct tests
etag change in 31976ecf
was incorrect, revert it
Also correct regression in test suite.
This commit is contained in:
parent
199a53e936
commit
38a30a6e96
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue