* Added support for configurable reserved usernames * Added reserved usernames from mastodon issue 1355 * Fix reserved usernames
This commit is contained in:
parent
3f815b2052
commit
f7a30e2fae
5 changed files with 31 additions and 2 deletions
|
@ -381,6 +381,12 @@ RSpec.describe Account, type: :model do
|
|||
expect(account_2).to model_have_error_on_field(:username)
|
||||
end
|
||||
|
||||
it 'is invalid if the username is reserved' do
|
||||
account = Fabricate.build(:account, username: 'support')
|
||||
account.valid?
|
||||
expect(account).to model_have_error_on_field(:username)
|
||||
end
|
||||
|
||||
context 'when is local' do
|
||||
it 'is invalid if the username doesn\'t only contains letters, numbers and underscores' do
|
||||
account = Fabricate.build(:account, username: 'the-doctor')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue