@@ -94,8 +94,9 @@ def run
9494 # contributors
9595 refute material . contributors . nil? , 'material contributors is nil'
9696 assert_equal 1 , material . contributors . size , 'material contributors count not matched.'
97- assert material . contributors . include? ( 'Sam Smiths' ) , 'material contributor[Sam Smiths] missing.'
98- refute material . contributors . include? ( 'Wily Coyote' ) , 'material contributor[Wily Coyote] exists.'
97+ contributor_names = material . contributors . map ( &:display_name )
98+ assert contributor_names . include? ( 'Sam Smiths' ) , 'material contributor[Sam Smiths] missing.'
99+ refute contributor_names . include? ( 'Wily Coyote' ) , 'material contributor[Wily Coyote] exists.'
99100 # fields
100101 refute material . fields . nil? , 'material fields is nil'
101102 refute_empty material . fields , 'material fields is empty'
@@ -195,8 +196,9 @@ def run
195196 assert_equal 2 , updated . keywords . size , 'Updated keywords count not matched!'
196197 assert updated . keywords . include? ( 'book' ) , 'Updated keywords missing value!'
197198 assert_equal 2 , updated . authors . size , "Updated authors count not matched! ... #{ updated . authors . inspect } "
198- assert updated . authors . include? ( 'Steven Smith' ) , 'Updated authors[Steven Smith] missing!'
199- assert updated . authors . include? ( 'Sam Harpic' ) , 'Updated authors[Sam Harpic] missing!'
199+ author_names = updated . authors . map ( &:display_name )
200+ assert author_names . include? ( 'Steven Smith' ) , 'Updated authors[Steven Smith] missing!'
201+ assert author_names . include? ( 'Sam Harpic' ) , 'Updated authors[Sam Harpic] missing!'
200202 assert_equal 0 , updated . contributors . size , 'Updated contributors count not matched!'
201203
202204 # check locked fields not updated
0 commit comments