Skip to content

Commit

Permalink
Added test for wizard mode view
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorcorrea committed May 27, 2022
1 parent d017d10 commit c6973f9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/system/work_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,14 @@
visit work_path(work)
expect(page.html.include?('<a href="https://orcid.org/1234-5678-9012-3456"')).to be true
end

it "Renders in wizard mode when requested", js: true do
datacite_resource = PULDatacite::Resource.new(title: "Test dataset")
datacite_resource.creators << PULDatacite::Creator.new_person("Harriet", "Tubman", "1234-5678-9012-3456")
work = Work.create_dataset("Test dataset", user.id, user.default_collection_id, datacite_resource)

sign_in user
visit edit_work_path(work, wizard: true)
expect(page.html.include?("By initiating this new submission, we have reserved a draft DOI for your use")).to be true
end
end

0 comments on commit c6973f9

Please sign in to comment.