Skip to content

Commit

Permalink
add test for the not sending submission process when archived
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed May 18, 2024
1 parent ffc648f commit 3b9d3f1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/util/test_notifications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_new_note_notification
end

def test_processing_complete_notification
options = { ont_count: 1, submission_count: 1, acronym: "NOTIFY" }
options = { ont_count: 1, submission_count: 2, acronym: "NOTIFY" }
ont = LinkedData::SampleData::Ontology.create_ontologies_and_submissions(options)[2].first
subscription = _subscription(ont)
@@user.subscription = @@user.subscription.dup << subscription
Expand All @@ -107,6 +107,13 @@ def test_processing_complete_notification
assert_match ("Parsing Success"), all_emails.last.subject
assert_equal @@support_mails.uniq.sort, all_emails[1].to.sort
assert_equal admin_mails.uniq.sort, all_emails.last.to.sort


reset_mailer
sub = ont.submissions.first
sub.process_submission(Logger.new(TestLogFile.new), {archive: true})

assert_empty all_emails
ensure
ont.delete if ont
subscription.delete if subscription
Expand Down

0 comments on commit 3b9d3f1

Please sign in to comment.