otter-space-sdk/pkg/error/database_test.go
SoXX 75bbbb4408
Some checks failed
Gitea Build Check / Build (push) Failing after 26s
chore(tests):
refactored & fixed old test cases
2024-08-13 11:07:14 +02:00

31 lines
537 B
Go

package error
import "testing"
func TestDatabase_Error(t *testing.T) {
type fields struct {
Reason string
}
tests := []struct {
name string
fields fields
want string
}{
{
name: "Test 1: Reason",
fields: fields{Reason: "TEST ERROR"},
want: "Database error: TEST ERROR",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
e := Database{
Reason: tt.fields.Reason,
}
if got := e.Error(); got != tt.want {
t.Errorf("Error() = %v, want %v", got, tt.want)
}
})
}
}