FEATURE: Check if selectable avatars exist before enabling them (#10032)

This commit is contained in:
Bianca Nenciu
2020-06-22 16:58:26 +03:00
committed by GitHub
parent 685646540a
commit 68f767a557
6 changed files with 53 additions and 7 deletions

View File

@ -2033,8 +2033,8 @@ describe User do
it "sets a random avatar when selectable avatars is enabled" do
avatar1 = Fabricate(:upload)
avatar2 = Fabricate(:upload)
SiteSetting.selectable_avatars_enabled = true
SiteSetting.selectable_avatars = [avatar1.url, avatar2.url].join("\n")
SiteSetting.selectable_avatars_enabled = true
user = Fabricate(:user)
expect(user.uploaded_avatar_id).not_to be(nil)