Commit graph

24 commits

Author SHA1 Message Date
theexiile1305
e56a563286
fix: tests after rebase 2024-10-30 15:50:48 +01:00
Michael Fuchs
ee00ae2dee
Merge branch 'main' into main 2024-10-30 15:48:34 +01:00
c9f8a2acdd
Fix newline character in test attachment string for Windows
Updated the base64-encoded string for attachments in the tests to reflect the correct newline character for Windows. This ensures that the test cases correctly validate the presence of attachments in the mail messages.
2024-10-28 22:28:23 +01:00
b63a3dab9a
Adjust tests to handle platform-specific differences.
Added platform-specific checks for header and attachment content in `msgwriter_test.go`. This ensures compatibility and correct behavior on different operating systems, such as Windows and FreeBSD.
2024-10-28 22:20:09 +01:00
a30215ebce
Add tests for writeHeader and writeBody functions
Introduce comprehensive test cases for the writeHeader and writeBody functions in msgWriter. These tests cover various scenarios including handling of multiple header values, edge cases, and error conditions in body writing operations. This concludes all tests for msgwriter.go.
2024-10-28 22:02:43 +01:00
b7a87fb15b
Add tests for MsgWriter_writeString function
Implemented tests to validate the MsgWriter writeString method for successful writes, failure scenarios, and handling pre-existing errors in the writer. This improves coverage and ensures robustness of the MsgWriter component.
2024-10-28 21:30:50 +01:00
dedb0e36c8
Add tests for MsgWriter writePart functionality
Introduce tests to validate MsgWriter's handling of message parts. This includes ensuring charset defaulting behavior and proper inclusion of part descriptions.
2024-10-28 21:25:22 +01:00
5c8d07407f
Add tests for file attachments in msgWriter
This commit introduces unit tests covering various scenarios for attaching files in email messages using msgWriter. These tests check for proper encoding, custom content types, different transfer encodings, custom descriptions, and handling attachments without body parts.
2024-10-28 21:13:36 +01:00
61244a541e
Refactor msgWriter tests and add new test cases
Reorganize existing tests for msgWriter and writeMsg, adding subtests for various encoding, charset, and failure scenarios. Enhanced tests to cover multipart/mixed, multipart/related, multipart/alternative, application/pgp-encrypted, application/pgp-signature messages, and handling of preformatted headers.
2024-10-28 20:52:38 +01:00
theexiile1305
4a3dbddaff
chore: formatting and using another types as deprecated ones 2024-10-17 16:06:53 +02:00
theexiile1305
f6bda99464
feat: transfer configuration of intermediate certificate to caller of the library 2024-10-11 18:43:04 +02:00
theexiile1305
43ba8e3af2
feat: improved tests 2024-10-09 15:45:22 +02:00
theexiile1305
b4370ded12
fix: micalg part of content-type 2024-10-09 12:10:03 +02:00
theexiile1305
2368113872
feat: implementation of tests 2024-09-26 16:43:58 +02:00
590dfe97e7
Refactor error handling for nil template pointers
Replace fmt.Errorf with errors.New for consistency in error handling. This change ensures a more streamlined and uniform error reporting approach across the codebase. Also updated a test case from t.Errorf to t.Error for better readability.
2024-08-16 10:16:53 +02:00
263f6bb3de
Refactor SMTP client code for better readability
The variable names in the code related to the I/O of the SMTP client have been clarified for improved readability and comprehension. For example, unclear variable names like `d` and `w` have been replaced with more meaningful names like `depth` and `writer`. The same naming improvements have also been applied to function parameters. This update aims to enhance code maintenance and simplify future development processes.
2024-02-24 12:43:01 +01:00
2f60d9c5df
Add support for HTML alternative message body
The code has been updated to allow for an HTML alternative to the plain text body in messages. This includes adding a new function to add this alternative body along with additional unit tests to ensure the multipart messages are properly constructed. The tests also check the correct usage of different charsets.
2024-02-05 11:46:06 +01:00
900280a6cd
Test coverage for the added functionalities 2023-02-13 11:09:19 +01:00
3922d3f195
Switched copyright header from me to "The go-mail Authors" 2023-01-15 16:14:19 +01:00
31001e87b2
#24: Add SPDX license IDs for REUSE compliance
# SUMMARY

* Bad licenses:
* Deprecated licenses:
* Licenses without file extension:
* Missing licenses:
* Unused licenses:
* Used licenses: CC0-1.0, MIT
* Read errors: 0
* Files with copyright information: 45 / 45
* Files with license information: 45 / 45

Congratulations! Your project is compliant with version 3.0 of the REUSE Specification :-)
2022-06-17 15:05:54 +02:00
894ff7128c
Rename Write() to WriteTo() so it satisfies the io.WriteTo interface 2022-05-24 15:46:59 +02:00
975ebfc4b7
Make GoLinter happy 2022-03-21 14:55:49 +01:00
c3298d7181
Make GoLinter happy 2022-03-21 10:17:26 +01:00
830cb5632d
msgwriter.go is now fully test covered (93%) 2022-03-21 09:55:45 +01:00