diff --git a/app/graphql/types/person_type.rb b/app/graphql/types/person_type.rb index 4bc6459e2..bf1cfc5af 100644 --- a/app/graphql/types/person_type.rb +++ b/app/graphql/types/person_type.rb @@ -40,7 +40,7 @@ def publications(**args) Doi.query(nil, user_id: orcid_from_url(object[:id]), relation_type_id: "text", state: "findable", page: { size: args[:first], number: 1 }).results.to_a end - def softwares(**_args) + def softwares(**args) Doi.query(nil, user_id: orcid_from_url(object[:id]), relation_type_id: "software", state: "findable", page: { size: args[:first], number: 1 }).results.to_a end diff --git a/app/models/person.rb b/app/models/person.rb index 37fcc3d05..638acdd2f 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -49,7 +49,7 @@ def self.parse_message(id: nil, message: nil) id: id, orcid: message["orcid"], name: message["name"], - given_names: message["givenNames"], + given_name: message["givenNames"], family_name: message["familyName"] }) end diff --git a/spec/models/person_spec.rb b/spec/models/person_spec.rb index 0daa311ff..837093290 100644 --- a/spec/models/person_spec.rb +++ b/spec/models/person_spec.rb @@ -9,7 +9,7 @@ person = people[:data].first expect(person.id).to eq("https://orcid.org/0000-0003-1519-3661") expect(person.name).to eq("Peter Godfrey-Smith") - expect(person.given_names).to eq("Peter") + expect(person.given_name).to eq("Peter") expect(person.family_name).to eq("Godfrey-Smith") end @@ -30,7 +30,7 @@ person = people[:data].first expect(person.id).to eq("https://orcid.org/0000-0003-0796-7209") expect(person.name).to eq("Peter St George-Hyslop") - expect(person.given_names).to eq("Peter") + expect(person.given_name).to eq("Peter") expect(person.family_name).to eq(" St George-Hyslop") end @@ -42,7 +42,7 @@ person = people[:data].first expect(person.id).to eq("https://orcid.org/0000-0003-0175-443X") expect(person.name).to eq("Hajira Dambha-Miller") - expect(person.given_names).to eq("Hajira") + expect(person.given_name).to eq("Hajira") expect(person.family_name).to eq("Dambha-Miller") end