tests are now working
This commit is contained in:
parent
d28ea1a30b
commit
14c74f27cb
2 changed files with 2 additions and 44 deletions
|
@ -52,18 +52,14 @@ func Test_StarMarshalJSON(t *testing.T) {
|
|||
func Test_StarUnmarshalJSON(t *testing.T) {
|
||||
type testPair struct {
|
||||
item []byte
|
||||
want Star
|
||||
want *Star
|
||||
wantErr error
|
||||
}
|
||||
|
||||
tests := map[string]testPair{
|
||||
"empty": {
|
||||
item: []byte(``),
|
||||
want: Star{},
|
||||
},
|
||||
"with ID": {
|
||||
item: []byte(`{"source":"forgejo","type":"Star","actor":"https://repo.prod.meissa.de/api/activitypub/user-id/1","object":"https://codeberg.org/api/activitypub/repository-id/1"}`),
|
||||
want: Star{
|
||||
want: &Star{
|
||||
Source: "forgejo",
|
||||
Activity: ap.Activity{
|
||||
Actor: ap.IRI("https://repo.prod.meissa.de/api/activitypub/user-id/1"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue