Merge tag 'v2.6.5' into instance_only_statuses
This commit is contained in:
@ -618,9 +618,15 @@ RSpec.describe Account, type: :model do
|
||||
expect(account).not_to model_have_error_on_field(:username)
|
||||
end
|
||||
|
||||
it 'is invalid if the username doesn\'t only contains letters, numbers and underscores' do
|
||||
it 'is valid even if the username contains hyphens' do
|
||||
account = Fabricate.build(:account, domain: 'domain', username: 'the-doctor')
|
||||
account.valid?
|
||||
expect(account).to_not model_have_error_on_field(:username)
|
||||
end
|
||||
|
||||
it 'is invalid if the username doesn\'t only contains letters, numbers, underscores and hyphens' do
|
||||
account = Fabricate.build(:account, domain: 'domain', username: 'the doctor')
|
||||
account.valid?
|
||||
expect(account).to model_have_error_on_field(:username)
|
||||
end
|
||||
|
||||
|
@ -101,7 +101,7 @@ RSpec.describe Notification, type: :model do
|
||||
before do
|
||||
allow(accounts_with_ids).to receive(:[]).with(stale_account1.id).and_return(account1)
|
||||
allow(accounts_with_ids).to receive(:[]).with(stale_account2.id).and_return(account2)
|
||||
allow(Account).to receive_message_chain(:where, :map, :to_h).and_return(accounts_with_ids)
|
||||
allow(Account).to receive_message_chain(:where, :each_with_object).and_return(accounts_with_ids)
|
||||
end
|
||||
|
||||
let(:cached_items) do
|
||||
|
Reference in New Issue
Block a user