Completed
Push — main ( 9faed7...8c19e1 )
by Yume
15s queued 12s
created

test/utils_test.go   A

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 23
dl 0
loc 31
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A test.TestSendEmail 0 24 4
1
package test
2
3
import (
4
	"github.com/memnix/memnixrest/pkg/utils"
5
	"testing"
6
)
7
8
func TestSendEmail(t *testing.T) {
9
	type args struct {
10
		email   string
11
		subject string
12
		body    string
13
	}
14
	tests := []struct {
15
		name    string
16
		args    args
17
		wantErr bool
18
	}{
19
		{
20
			name: "SendEmail",
21
			args: args{
22
				email:   "[email protected]",
23
				subject: "Test",
24
				body:    "Test",
25
			},
26
		},
27
	}
28
	for _, tt := range tests {
29
		t.Run(tt.name, func(t *testing.T) {
30
			if err := utils.SendEmail(tt.args.email, tt.args.subject, tt.args.body); err != nil {
31
				t.Errorf("SendEmail() error = %v, wantErr %v", err, tt.wantErr)
32
			}
33
		})
34
	}
35
}
36