1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-05 16:56:23 -07:00
gochan/pkg/gcutil/api_test.go
Eggbertx d1292bd9fe refactor/reorganize gochan's source code into subpackages
Also use Go version 1.11 in vagrant for module support
2020-04-29 17:44:29 -07:00

25 lines
501 B
Go

package gcutil
import (
"errors"
"testing"
)
func TestAPI(t *testing.T) {
failedPost, _ := MarshalJSON(map[string]interface{}{
"action": "post",
"success": false,
"message": errors.New("Post failed").Error(),
}, true)
madePost, _ := MarshalJSON(map[string]interface{}{
"action": "post",
"success": true,
"board": "test",
"post": "12345#12346", // JS converts this to /test/res/12345.html#123456
}, true)
t.Log(
"failedPost:", failedPost,
"\nmadePost:", madePost)
}