Skip to content

Commit

Permalink
person spec for find all
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Apr 10, 2020
1 parent 80786a1 commit 9240ba5
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 9 deletions.
53 changes: 53 additions & 0 deletions spec/fixtures/vcr_cassettes/Person/query/found_all.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions spec/models/person_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,16 @@
it "found all" do
query = "*"
people = Person.query(query)
expect(people.dig(:meta, "total")).to eq(7089)
expect(people.dig(:meta, "total")).to eq(8522184)
expect(people.dig(:data).size).to eq(25)
person = people[:data].first
expect(person.id).to eq("https://orcid.org/0000-0002-2131-0054")
expect(person.name).to eq("Edmund Miller")
expect(person.given_name).to eq("Edmund")
expect(person.family_name).to eq("Miller")
expect(person.affiliation).to eq([{"name"=>"Feinstein Institute for Medical Research"},
{"name"=>"Hofstra Northwell School of Medicine at Hofstra University"},
{"name"=>"King's College London"},
{"name"=>"University of Texas Health Northeast"}])
expect(person.id).to eq("https://orcid.org/0000-0003-3995-3004")
expect(person.name).to eq("Letícia Rodrigues Bueno")
expect(person.given_name).to eq("Letícia Rodrigues")
expect(person.family_name).to eq("Bueno")
expect(person.affiliation).to eq([{"name"=>"Universidade Estadual de Maringá"},
{"name"=>"Universidade Federal do ABC"},
{"name"=>"Universidade Federal do Rio de Janeiro"}])
end

it "found miller" do
Expand Down

0 comments on commit 9240ba5

Please sign in to comment.