Skip to content

Commit c2e8085

Browse files
committed
Remove test for redundant method
1 parent 6decfa1 commit c2e8085

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

test/models/person_test.rb

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -97,36 +97,6 @@ class PersonTest < ActiveSupport::TestCase
9797
assert_equal profile1, person.profile
9898
end
9999

100-
test 'extract attributes from string' do
101-
p = Person.attr_from_string('Joe Bloggs')
102-
assert_equal 'Joe Bloggs', p[:name]
103-
assert_nil p[:orcid]
104-
105-
p = Person.attr_from_string(' Joe')
106-
assert_equal 'Joe', p[:name]
107-
assert_nil p[:orcid]
108-
109-
p = Person.attr_from_string('Bloggs, Billy-Joe')
110-
assert_equal 'Bloggs, Billy-Joe', p[:name]
111-
assert_nil p[:orcid]
112-
113-
p = Person.attr_from_string('Bloggs, Billy-Joe (orcid: 0000-0002-1825-0097)')
114-
assert_equal 'Bloggs, Billy-Joe', p[:name]
115-
assert_equal '0000-0002-1825-0097', p[:orcid]
116-
117-
p = Person.attr_from_string('Bloggs, Billy-Joe (https://orcid.org/0000-0002-1825-0097)')
118-
assert_equal 'Bloggs, Billy-Joe', p[:name]
119-
assert_equal '0000-0002-1825-0097', p[:orcid]
120-
121-
p = Person.attr_from_string('Bloggs, Billy-Joe 0000-0002-1825-0097')
122-
assert_equal 'Bloggs, Billy-Joe', p[:name]
123-
assert_equal '0000-0002-1825-0097', p[:orcid]
124-
125-
p = Person.attr_from_string('Bloggs, Billy-Joe (0000-0002-1825-0097)')
126-
assert_equal 'Bloggs, Billy-Joe', p[:name]
127-
assert_equal '0000-0002-1825-0097', p[:orcid]
128-
end
129-
130100
test 'lookup for autocomplete' do
131101
@material.authors.create!(name: 'John Doe', orcid: '0000-0002-1825-0097')
132102
@material.authors.create!(name: 'jane Doe')

0 commit comments

Comments
 (0)