diff options
author | Emily Strickland <github@emily.st> | 2022-11-13 12:02:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-13 21:02:09 +0100 |
commit | c2231539c78103e000ef5edeeade9d3bbe54ac8d (patch) | |
tree | c8ad35f313303e8620cd5db61ec07286341c2536 /spec | |
parent | bd806a3090f793b8a967d79e06019ec0a3ad17bf (diff) |
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.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/account/field_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/account/field_spec.rb b/spec/models/account/field_spec.rb index fcb2a884a..b4beec048 100644 --- a/spec/models/account/field_spec.rb +++ b/spec/models/account/field_spec.rb @@ -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 |