forked from ontoportal/ontologies_api_ruby_client
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from ncbo/upgrade/ruby-3.1.6
Prepare for Ruby 3.1.6 upgrade
- Loading branch information
Showing
6 changed files
with
76 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
module LinkedData | ||
module Client | ||
VERSION = '2.4.0' | ||
VERSION = '2.5.0' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'test_case' | ||
|
||
class LinkExplorerTest < LinkedData::Client::TestCase | ||
def test_explore_ontology_submission_by_id | ||
ont = LinkedData::Client::Models::Ontology.get('FMA') | ||
sub = ont.explore.submissions('29') | ||
refute_nil(sub) | ||
assert_instance_of(LinkedData::Client::Models::OntologySubmission, sub) | ||
assert_equal(29, sub.submissionId) | ||
end | ||
|
||
def test_explore_ontology_class_by_id | ||
ont = LinkedData::Client::Models::Ontology.get('FMA') | ||
cls = ont.explore.classes('http://purl.org/sig/ont/fma/fma70742') | ||
refute_nil(cls) | ||
assert_instance_of(LinkedData::Client::Models::Class, cls) | ||
assert_equal('http://purl.org/sig/ont/fma/fma70742', cls.id) | ||
assert_equal('Set of eyelashes', cls.prefLabel) | ||
end | ||
|
||
def test_explore_ontology_single_class | ||
ont = LinkedData::Client::Models::Ontology.get('FMA') | ||
cls = ont.explore.single_class('http://purl.org/sig/ont/fma/fma322428') | ||
refute_nil(cls) | ||
assert_instance_of(LinkedData::Client::Models::Class, cls) | ||
assert_equal('http://purl.org/sig/ont/fma/fma322428', cls.id) | ||
assert_equal('Set of salivary glands', cls.prefLabel) | ||
end | ||
end |