Skip to content
This repository has been archived by the owner on Nov 20, 2019. It is now read-only.

Correct some failing tests #167

Merged
merged 1 commit into from
Oct 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions spec/features/stash_datacite/dataset_versioning_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@
expect(@resource.current_curation_status).to eql('submitted')
end

it 'sent out an email to the author', js: true do
expect(ActionMailer::Base.deliveries.count).to eq(1)
end

it 'displays the proper information on the My Datasets page', js: true do
click_link 'My Datasets'
within(:css, '#user_submitted tbody tr:first-child') do
Expand Down Expand Up @@ -180,10 +176,6 @@
expect(@resource.current_curation_activity.note.include?(@resource.edit_histories.last.user_comment)).to eql(true)
end

it 'did not send out an additional email to the author', js: true do
expect(ActionMailer::Base.deliveries.count).to eq(1)
end

it 'displays the proper information on the Admin page', js: true do
within(:css, '.c-lined-table__row') do

Expand Down
6 changes: 3 additions & 3 deletions spec/models/stash_engine/resources_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ module StashEngine
let!(:resource) { create(:resource, identifier: create(:identifier)) }

it 'returns false if hold_for_peer_review flag is not set' do
expect(resource.send(:requires_peer_review?)).to eql(false)
expect(resource.send(:hold_for_peer_review?)).to eql(false)
end
it 'returns true if hold_for_peer_review flag is set' do
resource.hold_for_peer_review = true
expect(resource.send(:requires_peer_review?)).to eql(true)
expect(resource.send(:hold_for_peer_review?)).to eql(true)
end
it 'returns false if hold_for_peer_review flag is not set and there is no publication defined' do
expect(resource.send(:requires_peer_review?)).to eql(false)
expect(resource.send(:hold_for_peer_review?)).to eql(false)
end

end
Expand Down