|
1 | 1 | # frozen_string_literal: true |
2 | 2 |
|
3 | | -# Copyright (c) 2018-2022 The Ruby Citation File Format Developers. |
| 3 | +# Copyright (c) 2018-2024 The Ruby Citation File Format Developers. |
4 | 4 | # |
5 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
6 | 6 | # you may not use this file except in compliance with the License. |
@@ -32,15 +32,21 @@ def test_update_cff_version |
32 | 32 | def test_build_actor_collection |
33 | 33 | array = [ |
34 | 34 | { 'family-names' => 'Second', 'given-names' => 'First' }, |
35 | | - { 'name' => 'Company' } |
| 35 | + { 'name' => 'Company' }, |
| 36 | + ::CFF::Person.new('Firstname', 'Secondname'), |
| 37 | + ::CFF::Entity.new('Company Inc.') |
36 | 38 | ] |
37 | 39 |
|
38 | 40 | build_actor_collection!(array) |
39 | | - assert_equal(2, array.length) |
| 41 | + assert_equal(4, array.length) |
40 | 42 | assert_instance_of ::CFF::Person, array[0] |
41 | 43 | assert_equal('First', array[0].given_names) |
42 | 44 | assert_instance_of ::CFF::Entity, array[1] |
43 | 45 | assert_equal('Company', array[1].name) |
| 46 | + assert_instance_of ::CFF::Person, array[2] |
| 47 | + assert_equal('Firstname', array[2].given_names) |
| 48 | + assert_instance_of ::CFF::Entity, array[3] |
| 49 | + assert_equal('Company Inc.', array[3].name) |
44 | 50 | end |
45 | 51 |
|
46 | 52 | def test_normalize_modelpart_array |
|
0 commit comments