(t *testing.T, r string)
| 98 | } |
| 99 | |
| 100 | func (ed *SimpleExample) assertHTMLContent(t *testing.T, r string) { |
| 101 | |
| 102 | // Assert on product |
| 103 | assert.Contains(t, r, "HermesName", "Product: Should find the name of the product in email") |
| 104 | assert.Contains(t, r, "http://hermes-link.com", "Product: Should find the link of the product in email") |
| 105 | assert.Contains(t, r, "Copyright © Hermes-Test", "Product: Should find the Copyright of the product in email") |
| 106 | assert.Contains(t, r, "http://www.duchess-france.org/wp-content/uploads/2016/01/gopher.png", "Product: Should find the logo of the product in email") |
| 107 | assert.Contains(t, r, "If you’re having trouble with the button 'Confirm your account', copy and paste the URL below into your web browser.", "Product: Should find the trouble text in email") |
| 108 | // Assert on email body |
| 109 | assert.Contains(t, r, "Hi Jon Snow", "Name: Should find the name of the person") |
| 110 | assert.Contains(t, r, "Welcome to Hermes", "Intro: Should have intro") |
| 111 | assert.Contains(t, r, "Birthday", "Dictionary: Should have dictionary") |
| 112 | assert.Contains(t, r, "Open source programming language", "Table: Should have table with first row and first column") |
| 113 | assert.Contains(t, r, "Programmatically create beautiful e-mails using Golang", "Table: Should have table with second row and first column") |
| 114 | assert.Contains(t, r, "$10.99", "Table: Should have table with first row and second column") |
| 115 | assert.Contains(t, r, "$1.99", "Table: Should have table with second row and second column") |
| 116 | assert.Contains(t, r, "started with Hermes", "Action: Should have instruction") |
| 117 | assert.Contains(t, r, "Confirm your account", "Action: Should have button of action") |
| 118 | assert.Contains(t, r, "#22BC66", "Action: Button should have given color") |
| 119 | assert.Contains(t, r, "https://hermes-example.com/confirm?token=d9729feb74992cc3482b350163a1a010", "Action: Button should have link") |
| 120 | assert.Contains(t, r, "Need help, or have questions", "Outro: Should have outro") |
| 121 | } |
| 122 | |
| 123 | func (ed *SimpleExample) assertPlainTextContent(t *testing.T, r string) { |
| 124 |
nothing calls this directly
no outgoing calls
no test coverage detected