Skip to content

Commit

Permalink
add context parents generation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed May 18, 2024
1 parent 2a849c7 commit c83b0d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def handle_missing_labels(file_path, logger)
}
}

RequestStore.store[:requested_lang] = :ALL
raw_paging = LinkedData::Models::Class.in(@submission).include(:prefLabel, :synonym, :label)
loop_classes(logger, raw_paging, @submission, callbacks)
end
Expand Down
4 changes: 3 additions & 1 deletion test/models/test_class_request_lang.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ def test_context_language
cls.submission.ontology.bring_remaining

# Default portal language
response = MultiJson.load(LinkedData::Serializers::JSON.serialize(cls))
cls.bring_remaining
response = MultiJson.load(LinkedData::Serializers::JSON.serialize(cls, all: 'all'))
assert_equal response["@context"]["@language"], Goo.main_languages.first.to_s
assert_equal "http://www.w3.org/2000/01/rdf-schema#parents", response["@context"]["parents"]

# Request specific language
response = MultiJson.load(LinkedData::Serializers::JSON.serialize(cls, lang: 'fr'))
Expand Down

0 comments on commit c83b0d5

Please sign in to comment.