Commit 33224840 authored by Tugce Nur Tas's avatar Tugce Nur Tas
Browse files

add test for NotificationMailer if GroupAssignment gets submitted

parent 14f29168
......@@ -102,4 +102,16 @@ class GroupAssignmentTerminatesTest < ApplicationSystemTestCase
assert page.has_text? 'my_newly_added_feedback_comment_text'
end
end
test 'termination triggers notification email to creator' do
@group_assignment.update(period_end: 2.days.ago)
login_as @volunteer.user
visit terminate_group_assignment_path(@group_assignment)
page.accept_confirm do
click_button 'Einsatz wird hiermit abgeschlossen'
end
mail = ActionMailer::Base.deliveries.last
assert_equal @superadmin.email, mail['to'].to_s
end
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment