Move test to model/activitypub
This commit is contained in:
parent
7193c0bd9b
commit
5729cee3e5
1 changed files with 1 additions and 11 deletions
|
@ -5,18 +5,8 @@ package activitypub
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.gitea.io/gitea/models/activitypub"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type ActorData struct { // ToDo: is a mock struct a good idea?
|
|
||||||
schema string
|
|
||||||
userId string
|
|
||||||
path string
|
|
||||||
host string
|
|
||||||
port string // optional
|
|
||||||
}
|
|
||||||
|
|
||||||
func Test_ActorParser(t *testing.T) {
|
func Test_ActorParser(t *testing.T) {
|
||||||
type testPair struct {
|
type testPair struct {
|
||||||
item string
|
item string
|
||||||
|
@ -52,7 +42,7 @@ func Test_ActorParser(t *testing.T) {
|
||||||
|
|
||||||
for name, _ := range tests {
|
for name, _ := range tests {
|
||||||
t.Run(name, func(t *testing.T) {
|
t.Run(name, func(t *testing.T) {
|
||||||
_, err := activitypub.ParseActorData(tests[name].item)
|
_, err := ParseActorData(tests[name].item)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("parseActor() error = \"%v\"", err)
|
t.Errorf("parseActor() error = \"%v\"", err)
|
Loading…
Reference in a new issue