diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/account_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb index ebec463e1..ab4de9aa1 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -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') |