Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
Test each team student gets a mail
Browse files Browse the repository at this point in the history
  • Loading branch information
cesswairimu committed May 30, 2018
1 parent da97ee1 commit 1e40d60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/models/application_draft_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ def assign_project(project)
end

context 'when the application_draft is valid' do
let(:team) { create(:team) }
let(:application_draft) { create(:application_draft, :appliable) }
let(:application) { Application.last }
let(:students) { application_draft.students }
Expand All @@ -338,13 +339,12 @@ def assign_project(project)
expect(ActionMailer::DeliveryJob).to have_been_enqueued.with(
'ApplicationFormMailer', 'submitted', 'deliver_now',
application: submitted_application,
student: students.first

student: application_draft.team.students.first
)
expect(ActionMailer::DeliveryJob).to have_been_enqueued.with(
'ApplicationFormMailer', 'submitted', 'deliver_now',
application: submitted_application,
student: students.second
student: application_draft.team.students.second
)
end
end
Expand Down

0 comments on commit 1e40d60

Please sign in to comment.