Skip to content

Commit

Permalink
fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jul 23, 2020
1 parent 9769e81 commit b7ea3a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/requests/dois_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@
expect(json['data'].size).to eq(3)
expect(json.dig('meta', 'total')).to eq(3)
expect(json.dig('data', 0, 'attributes', 'publicationYear')).to eq(2011)
expect(json.dig('data', 0, 'attributes', 'types')).to eq("resourceType"=>"Dissertation", "resourceTypeGeneral"=>"Text")
expect(json.dig('data', 0, 'attributes', 'types')).to eq("bibtex"=>"phdthesis", "citeproc"=>"thesis", "resourceType"=>"Dissertation", "resourceTypeGeneral"=>"Text", "ris"=>"THES", "schemaOrg"=>"Thesis")
end
end

Expand All @@ -366,7 +366,7 @@
expect(json['data'].size).to eq(3)
expect(json.dig('meta', 'total')).to eq(3)
expect(json.dig('data', 0, 'attributes', 'publicationYear')).to eq(2011)
expect(json.dig('data', 0, 'attributes', 'types')).to eq("resourceType"=>"Instrument", "resourceTypeGeneral"=>"Other")
expect(json.dig('data', 0, 'attributes', 'types')).to eq("bibtex"=>"misc", "citeproc"=>"article", "resourceType"=>"Instrument", "resourceTypeGeneral"=>"Other", "ris"=>"GEN", "schemaOrg"=>"CreativeWork")
end
end

Expand All @@ -385,7 +385,7 @@
expect(json['data'].size).to eq(3)
expect(json.dig('meta', 'total')).to eq(3)
expect(json.dig('data', 0, 'attributes', 'publicationYear')).to eq(2011)
expect(json.dig('data', 0, 'attributes', 'types')).to eq("resourceType"=>"Presentation", "resourceTypeGeneral"=>"InteractiveResource")
expect(json.dig('data', 0, 'attributes', 'types')).to eq("bibtex"=>"misc", "citeproc"=>"article", "resourceType"=>"Presentation", "resourceTypeGeneral"=>"InteractiveResource", "ris"=>"GEN", "schemaOrg"=>"CreativeWork")
expect(json.dig('meta', 'resourceTypes')).to eq([{"count"=>3, "id"=>"interactive-resource", "title"=>"Interactive Resource"}])
end
end
Expand All @@ -405,7 +405,7 @@
expect(json['data'].size).to eq(3)
expect(json.dig('meta', 'total')).to eq(3)
expect(json.dig('data', 0, 'attributes', 'publicationYear')).to eq(2011)
expect(json.dig('data', 0, 'attributes', 'types')).to eq("resourceType"=>"Presentation", "resourceTypeGeneral"=>"Fake")
expect(json.dig('data', 0, 'attributes', 'types')).to eq("bibtex"=>"misc", "citeproc"=>"article", "resourceType"=>"Presentation", "resourceTypeGeneral"=>"Fake", "ris"=>"GEN", "schemaOrg"=>"CreativeWork")
expect(json.dig('meta', 'resourceTypes')).to eq([])
end
end
Expand Down Expand Up @@ -1482,7 +1482,7 @@
expect(last_response.status).to eq(200)
expect(json.dig('data', 'attributes', 'url')).to eq("http://www.bl.uk/pdf/pat.pdf")
expect(json.dig('data', 'attributes', 'doi')).to eq(doi.doi.downcase)
expect(json.dig('data', 'attributes', 'types')).to eq("resourceType"=>"BlogPosting", "resourceTypeGeneral"=>"DataPaper")
expect(json.dig('data', 'attributes', 'types')).to eq("bibtex"=>"misc", "citeproc"=>"article", "resourceType"=>"BlogPosting", "resourceTypeGeneral"=>"DataPaper", "ris"=>"GEN", "schemaOrg"=>"CreativeWork")
end

it 'sets state to findable' do
Expand Down Expand Up @@ -2065,7 +2065,7 @@
expect(last_response.status).to eq(201)
expect(json.dig('data', 'attributes', 'url')).to eq("https://idea.library.drexel.edu/islandora/object/idea:9531")
expect(json.dig('data', 'attributes', 'doi')).to eq("10.14454/9zwb-rb91")
expect(json.dig('data', 'attributes', 'types')).to eq("resourceType"=>"Dissertation", "resourceTypeGeneral"=>"Text")
expect(json.dig('data', 'attributes', 'types')).to eq("bibtex"=>"phdthesis", "citeproc"=>"thesis", "resourceType"=>"Dissertation", "resourceTypeGeneral"=>"Text", "ris"=>"THES", "schemaOrg"=>"Thesis")
expect(json.dig('data', 'attributes', 'descriptions', 0, 'description')).to start_with("Diet and physical activity")
expect(json.dig('data', 'attributes', 'titles')).to eq([{"lang"=>"en", "title"=>"The Relationship Among Sport Type, Micronutrient Intake and Bone Mineral Density in an Athlete Population","titleType"=>nil},{"lang"=>"en", "title"=>"Subtitle", "titleType"=>"Subtitle"}])
expect(json.dig('data', 'attributes', 'state')).to eq("findable")
Expand Down

0 comments on commit b7ea3a7

Please sign in to comment.