Skip to content

Commit

Permalink
Ensure publication author is turned into a creator
Browse files Browse the repository at this point in the history
  • Loading branch information
fbacall committed Jan 22, 2025
1 parent 9340bf1 commit c3ec4a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/functional/publications_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,9 @@ def test_title
.to_return(status: 200, body: File.new("#{Rails.root}/test/fixtures/files/mocking/efetch_response.txt"))

FactoryBot.create_list(:publication_with_author, 6)
max = FactoryBot.create(:max_publication)
author = max.publication_authors.where(last_name: 'LastReg').first
pub = FactoryBot.create(:max_publication)
disable_authorization_checks { pub.save! } # Update the publication to ensure authors are turned into creators
author = pub.publication_authors.where(last_name: 'LastReg').first
assert author.person

# Tests e.g. /people/123/publications
Expand Down

0 comments on commit c3ec4a7

Please sign in to comment.