mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-10-01 04:13:41 +00:00
18 lines
368 B
Go
18 lines
368 B
Go
![]() |
package certificates
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"codeberg.org/codeberg/pages/server/database"
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestMockCert(t *testing.T) {
|
||
|
db, err := database.NewTmpDB()
|
||
|
assert.NoError(t, err)
|
||
|
cert := mockCert("example.com", "some error msg", "codeberg.page", db)
|
||
|
if assert.NotEmpty(t, cert) {
|
||
|
assert.NotEmpty(t, cert.Certificate)
|
||
|
}
|
||
|
}
|