Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imadbourouche committed Feb 22, 2025
1 parent 3c12ea5 commit f5d14ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/models/mod/test_artefact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_find_artefact

def test_goo_attrs_to_load
attrs = LinkedData::Models::SemanticArtefact.goo_attrs_to_load([])
assert_equal [:acronym, :accessRights, :subject, :URI, :versionIRI, :creator, :identifier, :status, :language,
assert_equal [:acronym, :title, :accessRights, :subject, :URI, :versionIRI, :creator, :identifier, :status, :language,
:license, :rightsHolder, :description, :landingPage, :keyword, :bibliographicCitation, :contactPoint,
:contributor, :publisher, :coverage, :createdWith, :accrualMethod, :accrualPeriodicity,
:competencyQuestion, :wasGeneratedBy, :hasFormat, :includedInDataCatalog, :semanticArtefactRelation], attrs
Expand Down
9 changes: 4 additions & 5 deletions test/models/mod/test_artefact_catalog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ def test_create_artefact_catalog
end

def test_goo_attrs_to_load
all_attrs = LinkedData::Models::SemanticArtefactCatalog.goo_attrs_to_load([:all])
assert_equal LinkedData::Models::SemanticArtefactCatalog.attributes, all_attrs

default_attrs = LinkedData::Models::SemanticArtefactCatalog.goo_attrs_to_load([])
assert_equal [:acronym, :title, :color, :description, :logo, :fundedBy, :versionInfo, :homepage, :federated_portals], default_attrs
assert_equal [:acronym, :title, :identifier, :status, :language, :type, :accessRights, :license, :rightsHolder,
:description, :landingPage, :keyword, :bibliographicCitation, :created, :modified, :contactPoint, :creator,
:contributor, :publisher, :subject, :coverage, :createdWith, :accrualMethod, :accrualPeriodicity, :wasGeneratedBy, :accessURL], default_attrs

specified_attrs = LinkedData::Models::SemanticArtefactCatalog.goo_attrs_to_load([:acronym, :title, :keyword, :featureList])
assert_equal [:acronym, :title, :keyword, :featureList], specified_attrs
Expand All @@ -32,6 +31,6 @@ def test_bring_attrs
sac.save
all_attrs_to_bring = LinkedData::Models::SemanticArtefactCatalog.goo_attrs_to_load([:all])
sac.bring(*all_attrs_to_bring)
assert_equal all_attrs_to_bring, sac.loaded_attributes.to_a
assert_equal all_attrs_to_bring.sort, (sac.loaded_attributes.to_a + [:type]).sort
end
end

0 comments on commit f5d14ee

Please sign in to comment.