FIX: disable avatar education message when 'allow_uploaded_avatars' is

disabled
FEATURE: setting to disable avatar education message
This commit is contained in:
Arpit Jalan
2015-12-14 22:32:40 +05:30
parent f60a53762f
commit e65a7370ef
4 changed files with 25 additions and 2 deletions

View File

@ -109,6 +109,21 @@ describe ComposerMessagesFinder do
UserHistory.create!(action: UserHistory.actions[:notified_about_avatar], target_user_id: user.id )
expect(finder.check_avatar_notification).to be_blank
end
it "doesn't notify users if 'disable_avatar_education_message' setting is enabled" do
SiteSetting.disable_avatar_education_message = true
expect(finder.check_avatar_notification).to be_blank
end
it "doesn't notify users if 'sso_overrides_avatar' setting is enabled" do
SiteSetting.sso_overrides_avatar = true
expect(finder.check_avatar_notification).to be_blank
end
it "doesn't notify users if 'allow_uploaded_avatars' setting is disabled" do
SiteSetting.allow_uploaded_avatars = false
expect(finder.check_avatar_notification).to be_blank
end
end
context '.check_sequential_replies' do
@ -313,4 +328,3 @@ describe ComposerMessagesFinder do
end
end