Skip to content

Commit

Permalink
update agent test to work with the new Agent validators
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Jul 5, 2023
1 parent 09a7eb7 commit cf74166
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/goo.git
revision: 39b7f2f2e9c398b981fb03feaa1eebc270877341
revision: 6c1790433c6897dd398dce89ff724646e1c7e6af
branch: development
specs:
goo (0.0.2)
Expand Down Expand Up @@ -53,7 +53,7 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/ontologies_linked_data.git
revision: f1edac81ea06d10ac91e98877b0283286fdc6535
revision: 596dc903e437e2b6af0893e8d68b9e4b4e640106
branch: feature/add-persons-and-organization-models
specs:
ontologies_linked_data (0.0.1)
Expand Down Expand Up @@ -108,7 +108,7 @@ GEM
airbrussh (1.4.1)
sshkit (>= 1.6.1, != 1.7.0)
backports (3.24.1)
bcrypt (3.1.18)
bcrypt (3.1.19)
bcrypt_pbkdf (1.1.0)
bigdecimal (1.4.2)
builder (3.2.4)
Expand Down Expand Up @@ -171,7 +171,7 @@ GEM
retriable (>= 2.0, < 4.a)
rexml
webrick
googleauth (1.5.2)
googleauth (1.6.0)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
Expand Down Expand Up @@ -228,7 +228,7 @@ GEM
net-protocol
net-ssh (7.1.0)
netrc (0.11.0)
newrelic_rpm (9.2.2)
newrelic_rpm (9.3.0)
oj (2.18.5)
omni_logger (0.1.4)
logger
Expand Down Expand Up @@ -324,7 +324,7 @@ GEM
systemu (2.6.5)
temple (0.10.2)
tilt (2.2.0)
timeout (0.3.2)
timeout (0.4.0)
trailblazer-option (0.1.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
Expand Down
5 changes: 3 additions & 2 deletions test/controllers/test_agents_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def test_new_agent_no_valid
agents_tmp = [ _agent_data(type: 'organization'), _agent_data(type: 'person'), _agent_data(type: 'person')]
agent = agents_tmp.last
agent[:affiliations] = [agents_tmp[0].stringify_keys, agents_tmp[1].stringify_keys]
_test_agent_creation(agent)
post "/agents", MultiJson.dump(agent), "CONTENT_TYPE" => "application/json"
assert last_response.status == 400
end

def test_update_patch_agent
Expand Down Expand Up @@ -180,7 +181,7 @@ def _agent_data(type: 'organization')
name: "name #{i}",
homepage: "home page #{i}",
acronym: "acronym #{i}",
email: "email #{i}",
email: "email_#{i}@test.com",
identifiers: test_identifiers.sample(2).map { |x| x.merge({ creator: user }) },
affiliations: [],
creator: user
Expand Down

0 comments on commit cf74166

Please sign in to comment.