mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Add a test for ensure only edited badge titles updates a users
title
Adding a test to make sure we don't regress here in the future.
Follow up to: 8a89b7e108
This commit is contained in:
@@ -472,6 +472,18 @@ RSpec.describe Admin::SiteTextsController do
|
|||||||
# Revert
|
# Revert
|
||||||
delete "/admin/customize/site_texts/badges.regular.name.json"
|
delete "/admin/customize/site_texts/badges.regular.name.json"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'does not update matching user titles when overriding non-title badge text' do
|
||||||
|
Jobs.expects(:enqueue).with(
|
||||||
|
:bulk_user_title_update,
|
||||||
|
new_title: 'Terminator',
|
||||||
|
granted_badge_id: badge.id,
|
||||||
|
action: Jobs::BulkUserTitleUpdate::UPDATE_ACTION
|
||||||
|
).never
|
||||||
|
put '/admin/customize/site_texts/badges.regular.long_description.json', params: {
|
||||||
|
site_text: { value: 'Terminator' }
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user