Skip to content

Commit 9041eb6

Browse files
add link explorer tests
1 parent 6608b2d commit 9041eb6

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

mise.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
ruby = "latest"

test/models/test_explore.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require_relative '../test_case'
2+
require 'pry'
3+
4+
class LinkExploreTest < LinkedData::Client::TestCase
5+
6+
def test_explore
7+
sub_direct_explore = LinkedData::Client::Models::Ontology.explore('MEDDRA').latest_submission(include: 'all')
8+
sub_indirect_explore = LinkedData::Client::Models::Ontology.find('MEDDRA').explore.latest_submission
9+
sub_direct_explore.to_hash.each do |key, value|
10+
value_to_compare = sub_indirect_explore[key]
11+
if value.class.ancestors.include?(LinkedData::Client::Base)
12+
value = value.to_hash
13+
value_to_compare = value_to_compare.to_hash
14+
end
15+
assert_equal value, value_to_compare
16+
end
17+
end
18+
19+
end

0 commit comments

Comments
 (0)