Skip to content

Commit

Permalink
Version Bump v3.2.0: Merge #75
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkingserious committed Aug 17, 2016
1 parent c3aaf27 commit 9928a67
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Change Log
All notable changes to this project will be documented in this file.

## [3.2.0] - 2016-08-17
### Added
- Merged pull request: [make contents var args in NewV3MailInit](https://github.com/sendgrid/sendgrid-go/pull/75)
- The `NewV3MailInit` [Mail Helper](https://github.com/sendgrid/sendgrid-go/tree/master/helpers/mail) constructor can now take in multiple content objects.
- Thanks to [Adrien Delorme](https://github.com/azr) for the pull request!

## [3.1.0] - 2016-07-28
- Dependency update to v2.2.0 of [sendGrid-rest](https://github.com/sendgrid/rest/releases/tag/v2.2.0)
- Pull [#9](https://github.com/sendgrid/rest/pull/9): Allow for setting a custom HTTP client
Expand Down
24 changes: 24 additions & 0 deletions helpers/mail/mail_v3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,30 @@ func TestV3NewMail(t *testing.T) {
}
}

func TestV3NewMailInit(t *testing.T) {
from := NewEmail("Example User", "[email protected]")
subject := "Hello World from the SendGrid Go Library"
to := NewEmail("Example User", "[email protected]")
content := NewContent("text/plain", "some text here")
m := NewV3MailInit(from, subject, to, content)

if m == nil {
t.Errorf("NewV3MailInit() shouldn't return nil")
}

if m.From == nil {
t.Errorf("From shouldn't be nil")
}

if m.Personalizations == nil {
t.Errorf("Personalizations shouldn't be nil")
}

if m.Content == nil {
t.Errorf("Content shouldn't be nil")
}
}

func TestV3AddPersonalizations(t *testing.T) {
numOfPersonalizations := rand.New(rand.NewSource(99)).Intn(10)
personalizations := make([]*Personalization, 0)
Expand Down

0 comments on commit 9928a67

Please sign in to comment.