Story #86 Add strip function to trainer email methods - cseseniordesign/reservations GitHub Wiki
End User Documentation
Dev Testing Instructions
- Make sure you are on the most recent version of the
dev-add-strip-function-to-trainer-emails
branch.
- Start your dev environment and log into your "Development x" account. These accounts only have a first name which is what previously caused the trainer emails to have unwanted whitespace after the name. This testing will not be conclusive if you use an account that has a last name.
- Make yourself a trainer if you are not already:
- Go to Admin > Users.
- Find yourself and click
Edit
.
- Check the
Make Trainer
box.
- Click
Update
.
- Create an event and assign yourself as the trainer:
- Go to Admin > Events.
- Create an event (either from a preset or from scratch).
- On the event creation page, click the
Trainer:
drop-down menu and select yourself.
- Set the event's start and end date to be in the future.
- Click
Create Event
.
- You should receive an email. In the email body, verify there is no whitespace between the last character of your name and the following period:
"Hi, Development 3." = correct "Hi, Development 3 ." = incorrect
- Modify the event you are assigned to:
- Modify the previous event by editing the event and changing any details aside from the assigned trainer.
- Save the event.
- You should receive an email. In the email body, verify there is no whitespace between the last character of your name and the following period:
"Hi, Development 3." = correct "Hi, Development 3 ." = incorrect
- Remove yourself from the event:
- Edit the same event from before. Click the
Trainer:
drop-down menu and set the event to have no trainer.
- Save the event.
- You should receive an email. In the email body, verify there is no whitespace between the last character of your name and the following period:
"Hi, Development 3." = correct "Hi, Development 3 ." = incorrect
- Assign yourself as a trainer for the event once again and save the event.
- You should receive an email. You can disregard this.
- Delete the event you are assigned to. You should receive an email. In the email body, verify there is no whitespace between the last character of your name and the following period:
"Hi, Development 3." = correct "Hi, Development 3 ." = incorrect
- The remaining method to be tested is the "Trainer Confirmation Reminder," which sends on a set schedule. If all of the above methods worked successfully, it is safe to assume the confirmation email will behave the same.
Technical Documentation
models/user.rb
- Added
.rstrip
to the all of the trainer email methods. This will remove any trailing whitespace after the last character of the trainer's name.