users: fix default user level in test env.

Bug: in the test environment, new users defaulted to the Anonymous level
instead of the Member level. This broke signing up as a new user with
Capybara during system tests.
This commit is contained in:
evazion
2019-09-17 18:15:36 -05:00
parent 02354e83fe
commit 9c34d5cc39

View File

@@ -311,12 +311,11 @@ class User < ApplicationRecord
self.can_approve_posts = true
self.can_upload_free = true
self.is_super_voter = true
else
self.level = Levels::MEMBER
end
end
def customize_new_user
self.level = User::Levels::MEMBER
Danbooru.config.customize_new_user(self)
end