Skip to content

Commit

Permalink
add agent usage attribute tests
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Oct 27, 2023
1 parent 1250a92 commit 688961f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ gem 'ncbo_annotator', git: 'https://github.com/ontoportal-lirmm/ncbo_annotator.g
gem 'ncbo_cron', git: 'https://github.com/ontoportal-lirmm/ncbo_cron.git', branch: 'master'
gem 'ncbo_ontology_recommender', git: 'https://github.com/ncbo/ncbo_ontology_recommender.git', branch: 'master'
gem 'sparql-client', github: 'ontoportal-lirmm/sparql-client', branch: 'master'
gem 'ontologies_linked_data', git: 'https://github.com/ontoportal-lirmm/ontologies_linked_data.git', branch: 'development'
gem 'ontologies_linked_data', git: 'https://github.com/ontoportal-lirmm/ontologies_linked_data.git', branch: 'feature/add-persons-and-organization-models'

group :development do
# bcrypt_pbkdf and ed35519 is required for capistrano deployments when using ed25519 keys; see https://github.com/miloserdow/capistrano-deploy/issues/42
Expand Down
32 changes: 15 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/ncbo/ncbo_ontology_recommender.git
revision: 83e835de368bc9f19da800a477982e0ad770900d
revision: f440ae855a217807fead1d20629a0f187997b973
branch: master
specs:
ncbo_ontology_recommender (0.0.1)
Expand All @@ -11,7 +11,7 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/goo.git
revision: 1d78bde5a711d05475da0459308c7db074af5e21
revision: 5979402d5138850fb9bdb34edfa350e9af1b5d22
branch: development
specs:
goo (0.0.2)
Expand Down Expand Up @@ -53,8 +53,8 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/ontologies_linked_data.git
revision: 4c89c8346766d23e09b24c8e29750bf3a91e6b53
branch: development
revision: 000d67f6dccf1e76b9379bc6ebb51c32efee539d
branch: feature/add-persons-and-organization-models
specs:
ontologies_linked_data (0.0.1)
activesupport
Expand Down Expand Up @@ -105,14 +105,14 @@ GEM
multi_json (~> 1.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
airbrussh (1.4.2)
airbrussh (1.5.0)
sshkit (>= 1.6.1, != 1.7.0)
backports (3.24.1)
bcrypt (3.1.19)
bcrypt_pbkdf (1.1.0)
bigdecimal (1.4.2)
builder (3.2.4)
capistrano (3.17.3)
capistrano (3.18.0)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
Expand Down Expand Up @@ -159,7 +159,7 @@ GEM
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
ffi (1.15.5)
ffi (1.16.3)
get_process_mem (0.2.7)
ffi (~> 1.0)
google-apis-analytics_v3 (0.13.0)
Expand All @@ -173,10 +173,9 @@ GEM
retriable (>= 2.0, < 4.a)
rexml
webrick
googleauth (1.7.0)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
Expand Down Expand Up @@ -205,11 +204,10 @@ GEM
net-imap
net-pop
net-smtp
memoist (0.16.2)
method_source (1.0.0)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0808)
mime-types-data (3.2023.1003)
mini_mime (1.1.5)
minitest (4.7.5)
minitest-stub_any_instance (1.0.3)
Expand All @@ -218,7 +216,7 @@ GEM
multi_json (1.15.0)
multipart-post (2.3.0)
net-http-persistent (2.9.4)
net-imap (0.3.7)
net-imap (0.4.2)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -227,11 +225,11 @@ GEM
timeout
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-smtp (0.3.3)
net-smtp (0.4.0)
net-protocol
net-ssh (7.2.0)
netrc (0.11.0)
newrelic_rpm (9.4.2)
newrelic_rpm (9.5.0)
oj (2.18.5)
omni_logger (0.1.4)
logger
Expand Down Expand Up @@ -294,7 +292,7 @@ GEM
rubyzip (2.3.2)
rufus-scheduler (2.0.24)
tzinfo (>= 0.3.22)
signet (0.17.0)
signet (0.18.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
Expand Down Expand Up @@ -325,8 +323,8 @@ GEM
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
systemu (2.6.5)
temple (0.10.2)
tilt (2.2.0)
temple (0.10.3)
tilt (2.3.0)
timeout (0.4.0)
trailblazer-option (0.1.2)
tzinfo (2.0.6)
Expand Down
4 changes: 2 additions & 2 deletions test/controllers/test_agents_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ def teardown
end

def test_all_agents
get '/agents'
get '/agents?display=all'
assert last_response.ok?

created_agents = MultiJson.load(last_response.body)

@agents.each do |agent|
created_agent = created_agents.select{|x| x["name"].eql?(agent[:name])}.first
refute_nil created_agent
refute_nil created_agent["usages"]
assert_equal agent[:name], created_agent["name"]
assert_equal agent[:identifiers].size, created_agent["identifiers"].size
assert_equal agent[:identifiers].map{|x| x[:notation]}.sort, created_agent["identifiers"].map{|x| x['notation']}.sort
Expand Down

0 comments on commit 688961f

Please sign in to comment.