Skip to content

Commit

Permalink
add map_attribute secondary lang test
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Mar 21, 2022
1 parent d9d75a8 commit afd464f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/models/test_class_main_lang.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ def test_map_attribute_not_found
assert_equal ['entita esp' , 'entite rien' ], cls.synonym
end

def test_map_attribute_secondary_lang
cls = parse_and_get_class lang: %w[es fr]
cls.bring :unmapped
LinkedData::Models::Class.map_attributes(cls)
assert_equal ['entité matérielle detaillée'], cls.label
assert_equal 'skos prefLabel rien', cls.prefLabel
assert_equal ['entita esp', 'entite rien'], cls.synonym
end


def test_label_main_lang_fr_found
cls = parse_and_get_class lang: ['fr']
assert_equal 'entité matérielle detaillée', cls.label.first
Expand Down

0 comments on commit afd464f

Please sign in to comment.