-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: send requestee and requester correct date and time when timezone… #5924
Conversation
…s differ #5198 Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5924 +/- ##
============================================
+ Coverage 23.30% 23.59% +0.28%
- Complexity 443 457 +14
============================================
Files 247 246 -1
Lines 11446 11715 +269
Branches 1923 2140 +217
============================================
+ Hits 2668 2764 +96
+ Misses 8778 8637 -141
- Partials 0 314 +314
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good! Could you please add a to \OCA\Calendar\Tests\Unit\Service\Appointments\MailServiceTest
that covers this scenario? Look at \OCA\Calendar\Tests\Unit\Service\Appointments\MailServiceTest::testSendConfirmationEmail
. Create a similar test that asserts the values passed to formatDateTimeRelativeDay
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
$this->lFactory->expects(self::once()) | ||
->method('get'); | ||
$this->dateFormatter->expects(self::once()) | ||
->method('formatDateTimeRelativeDay') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by using ->with(args)
you can assert the value of the arguments passed to this method. It will allow you to test if the fourth argument matches the expected timezone value. Same for the new testSendOrganizerBookingInformationEmailDifferentTZ
case
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! |
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good!
@@ -551,6 +662,7 @@ public function testSendOrganizerBookingInformationEmail(): void { | |||
->method('get'); | |||
$this->dateFormatter->expects(self::once()) | |||
->method('formatDateTimeRelativeDay') | |||
->with(self::anything(), self::anything(), self::anything(), new \DateTimeZone('Europe/Berlin')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 nice
Co-authored-by: Christoph Wurst <ChristophWurst@users.noreply.github.com> Signed-off-by: Sebastian Krupinski <165827823+SebastianKrupinski@users.noreply.github.com>
@SebastianKrupinski please squash your commits to a reasonable minimum number of commits before merge. It will help us maintain a clean git history, which makes the generation of a changelog a lot easier 🙏 |
Send requestee and requester correct date and time when requestee and requester time zones are different.
Fixes #5198