mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-09 09:12:19 +00:00
Test blank account field verifiability (#20458)
* Test blank account field verifiability This change tests the need for #20428, which ensures that we guard against a situation in which `at_xpath` returns `nil`. * Test verifiability of blank fields for remote account profiles This adds a counterpart test for remote account profiles' fields' verifiability when those fields are blank. I previously added the same test for local accounts.
This commit is contained in:
parent
bd806a3090
commit
c2231539c7
|
@ -89,6 +89,14 @@ RSpec.describe Account::Field, type: :model do
|
|||
expect(subject.verifiable?).to be false
|
||||
end
|
||||
end
|
||||
|
||||
context 'for text which is blank' do
|
||||
let(:value) { '' }
|
||||
|
||||
it 'returns false' do
|
||||
expect(subject.verifiable?).to be false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'for remote accounts' do
|
||||
|
@ -133,6 +141,14 @@ RSpec.describe Account::Field, type: :model do
|
|||
expect(subject.verifiable?).to be false
|
||||
end
|
||||
end
|
||||
|
||||
context 'for text which is blank' do
|
||||
let(:value) { '' }
|
||||
|
||||
it 'returns false' do
|
||||
expect(subject.verifiable?).to be false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue