You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
351 B
23 lines
351 B
package service
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestSavePublish(t *testing.T) {
|
|
Init()
|
|
|
|
timestamp := fmt.Sprint(time.Now().Unix())
|
|
|
|
userId := int64(1111111111111111111)
|
|
title := "Unit testing on " + timestamp
|
|
file := []byte("Unit testing on " + timestamp)
|
|
|
|
err := SavePublish(userId, title, file)
|
|
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
|