Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/datacite/lupo
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Aug 8, 2019
2 parents c4dc82e + 8eafc1c commit c4a80af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def citation_year
def date_published(doi)
## TODO: we need to make sure all the dois from other RA are indexed
item = Doi.where(doi: doi_from_url(doi)).first
item[:publication_year] if item.present?
item[:publication_year].to_s if item.present?
end

def set_defaults
Expand Down
3 changes: 2 additions & 1 deletion spec/models/event_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@

it "date_published from the database" do
published = subject.date_published("https://doi.org/"+doi.doi)
expect(published).to eq(2011)
expect(published).to eq("2011")
expect(published).not_to eq(2011)
end
end
end

0 comments on commit c4a80af

Please sign in to comment.