From afd464f30dd794a1a2b7f30fc47f27a43b2110bf Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Mon, 21 Mar 2022 10:15:42 +0100 Subject: [PATCH] add map_attribute secondary lang test --- test/models/test_class_main_lang.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/models/test_class_main_lang.rb b/test/models/test_class_main_lang.rb index 74edd3b4..07ad63b4 100644 --- a/test/models/test_class_main_lang.rb +++ b/test/models/test_class_main_lang.rb @@ -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