Test stabilization: Check Clearbit address against list of possible result values.
This commit is contained in:
parent
f34f0d14de
commit
21d8862988
1 changed files with 8 additions and 4 deletions
|
@ -271,11 +271,15 @@ class ClearbitTest < ActiveSupport::TestCase
|
||||||
assert_equal('', customer6.note)
|
assert_equal('', customer6.note)
|
||||||
assert_equal('', customer6.web)
|
assert_equal('', customer6.web)
|
||||||
#assert_equal('http://clearbit.com', customer6.web)
|
#assert_equal('http://clearbit.com', customer6.web)
|
||||||
#assert_equal('San Francisco, CA 94103, USA', customer6.address)
|
sometimes_changing_but_valid_addresses = [
|
||||||
assert_equal('90 Sheridan St, San Francisco, CA 94103, USA', customer6.address)
|
'San Francisco, CA, USA',
|
||||||
#assert_equal('San Francisco, CA, USA', customer6.address)
|
'San Francisco, CA 94103, USA',
|
||||||
|
'90 Sheridan St, San Francisco, CA 94103, USA',
|
||||||
|
'3030 16th St, San Francisco, CA 94103, USA',
|
||||||
|
]
|
||||||
|
assert_includes(sometimes_changing_but_valid_addresses, customer6.address)
|
||||||
|
|
||||||
organization6 = Organization.find_by(name: 'APIHub, Inc')
|
organization6 = Organization.find_by(name: 'APIHub, Inc.')
|
||||||
#assert_nil(organization6, 'unable to find org of user')
|
#assert_nil(organization6, 'unable to find org of user')
|
||||||
assert(ExternalSync.find_by(source: 'clearbit', object: 'Organization', o_id: organization6.id))
|
assert(ExternalSync.find_by(source: 'clearbit', object: 'Organization', o_id: organization6.id))
|
||||||
assert_equal(false, organization6.shared)
|
assert_equal(false, organization6.shared)
|
||||||
|
|
Loading…
Reference in a new issue