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

Commit

Permalink
Merge pull request #167 from ryscher/test-fixes
Browse files Browse the repository at this point in the history
Correct some failing tests
  • Loading branch information
sfisher authored Oct 22, 2019
2 parents 713e57e + 8646e26 commit ac9cc9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
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

0 comments on commit ac9cc9d

Please sign in to comment.