Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `.github/dependabot.yml`: Upstream made changes while we have dropped this file. Keep the file deleted. - `.prettierignore`: Upstream made changes at the end of the file, where we had our extra lines. Just moved our extra lines back at the end. - `app/serializers/initial_state_serializer.rb`: Upstream code style changes. Applied them. - `app/services/backup_service.rb`: Upstream code style changes. Applied them.
This commit is contained in:
@@ -15,7 +15,7 @@ describe NoteLengthValidator do
|
||||
end
|
||||
|
||||
it 'counts URLs as 23 characters flat' do
|
||||
text = ('a' * 476) + " http://#{'b' * 30}.com/example"
|
||||
text = ('a' * 476) + " http://#{'b' * 30}.com/example"
|
||||
account = double(note: text, errors: double(add: nil))
|
||||
|
||||
subject.validate_each(account, 'note', text)
|
||||
@@ -23,7 +23,7 @@ describe NoteLengthValidator do
|
||||
end
|
||||
|
||||
it 'does not count non-autolinkable URLs as 23 characters flat' do
|
||||
text = ('a' * 476) + "http://#{'b' * 30}.com/example"
|
||||
text = ('a' * 476) + "http://#{'b' * 30}.com/example"
|
||||
account = double(note: text, errors: double(add: nil))
|
||||
|
||||
subject.validate_each(account, 'note', text)
|
||||
|
||||
@@ -20,6 +20,7 @@ RSpec.describe PollValidator, type: :validator do
|
||||
|
||||
context 'expires just 5 min ago' do
|
||||
let(:expires_at) { 5.minutes.from_now }
|
||||
|
||||
it 'not calls errors add' do
|
||||
expect(errors).not_to have_received(:add)
|
||||
end
|
||||
|
||||
@@ -11,10 +11,10 @@ RSpec.describe UnreservedUsernameValidator, type: :validator do
|
||||
|
||||
let(:validator) { described_class.new }
|
||||
let(:account) { double(username: username, errors: errors) }
|
||||
let(:errors ) { double(add: nil) }
|
||||
let(:errors) { double(add: nil) }
|
||||
|
||||
context '@username.blank?' do
|
||||
let(:username) { nil }
|
||||
let(:username) { nil }
|
||||
|
||||
it 'not calls errors.add' do
|
||||
expect(errors).not_to have_received(:add).with(:username, any_args)
|
||||
@@ -22,7 +22,7 @@ RSpec.describe UnreservedUsernameValidator, type: :validator do
|
||||
end
|
||||
|
||||
context '!@username.blank?' do
|
||||
let(:username) { 'f' }
|
||||
let(:username) { 'f' }
|
||||
|
||||
context 'reserved_username?' do
|
||||
let(:reserved_username) { true }
|
||||
|
||||
Reference in New Issue
Block a user