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

Correct student names in confirmation email #967

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cesswairimu
Copy link

@cesswairimu cesswairimu commented Mar 12, 2018

Restore email sending code
So as to investigate the bug and find solution

Related issue #955

@cesswairimu cesswairimu force-pushed the feature/correct-student-name-application-email#955 branch from 46d9658 to da97ee1 Compare April 6, 2018 21:47
@cesswairimu
Copy link
Author

cesswairimu commented Apr 16, 2018

@ramonh could you kindly look at this, it is working fine from my end, Thanks

@hola-soy-milk
Copy link
Member

hola-soy-milk commented Apr 16, 2018

Hi @cesswairimu

My apologies! I wasn't sure if you needed a review 😅

I'll have a look! Thank you!

@cesswairimu cesswairimu changed the title [WIP] Correct student names in confirmation email Correct student names in confirmation email Apr 17, 2018
expect(ActionMailer::DeliveryJob).to have_been_enqueued.with(
'ApplicationFormMailer', 'submitted', 'deliver_now',
application: submitted_application,
student: students.second
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cesswairimu Thank you so much for taking care of this and for your patience!

I'm curious, do you think there's a way that we can also verify that the content of the application in the email corresponds to the correct student? This is the issue we really want to avoid.

Thank you in advance!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will look at that @ramonh thanks for the feedback

@emcoding
Copy link
Member

Hey @cesswairimu, this is getting real close! Are you still interested in finishing it? Let us know if we can help, or if we can close this?

@cesswairimu
Copy link
Author

cesswairimu commented May 24, 2018

Sorry @F3PiX Yes I am interested in finishing. I could use some help in testing. I tried implementing some tests but they are making another block of specs to fail. Should I push the file? or attach the snippet here so you can take a look? Thanks

@pgaspar
Copy link
Collaborator

pgaspar commented May 27, 2018

Hey @cesswairimu 👋 I think you can do whatever you prefer. We'll try to help either way 👍

@cesswairimu
Copy link
Author

cesswairimu commented May 28, 2018

Thanks @pgaspar just pushed the code. Thanks.

@@ -314,7 +314,8 @@ def assign_project(project)
end

context 'when the application_draft is valid' do
let(:application_draft) { create(:application_draft, :appliable) }
let(:team) { create(:team) }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @cesswairimu 👋 Gave this a quick look and it seems the issue is in this team you are creating. It needs to be an :applying_team for it to work well with the application draft.

But maybe instead of making the team work with create(:team, :applying_team) you could use the team that is created for you in the application_draft. Our factory already creates a team, so you can access it in your tests and use applying_team.team.students.first, for example. This way you could remove the team you created.

@cesswairimu cesswairimu force-pushed the feature/correct-student-name-application-email#955 branch 2 times, most recently from 1e40d60 to f4acc3b Compare May 30, 2018 09:36
@cesswairimu
Copy link
Author

@ramonh @pgaspar Please take a look and tell me if that covers the review changes requested. Thanks

Copy link
Member

@hola-soy-milk hola-soy-milk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much @cesswairimu for your changes! Looking great so far!

I have one suggestion for making this completely error-proof. Not sure how to go about this but I'll take a look and see if I can help 😊

application: submitted_application,
student: application_draft.team.students.first
)
expect(ActionMailer::DeliveryJob).to have_been_enqueued.with(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great so far, thank you @cesswairimu!

My only concern is that issue #955 cropped up due to the fact that the students' names were assigned to the emails but the contents of the application were being assigned to the wrong student.

Is there a way we can test the contents and make sure that the correct application information is assigned to the correct student?

@cesswairimu
Copy link
Author

Gotcha @ramonh will take a look see what I can find

@emcoding emcoding mentioned this pull request Jun 2, 2018
7 tasks
@emcoding
Copy link
Member

emcoding commented Jun 4, 2018

Heads up: Changes in #1007 has effect on this PR. See bc26170 (and its commits message).

@cesswairimu To make sure that your changes still work, you can pull the remote master branch into your local master branch, and then rebase. Or, if you don't want to rebase, go to your local master, pull the remote master; and open a new PR/branch.

@cesswairimu
Copy link
Author

👍 Thanks @F3PiX

@cesswairimu cesswairimu force-pushed the feature/correct-student-name-application-email#955 branch from f4acc3b to 3eac6fe Compare June 6, 2018 10:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants