Page MenuHomeMusing Studio

author_test.go
No OneTemporary

author_test.go

package writeas
import "testing"
func TestClient_CreateContributor(t *testing.T) {
c := NewClientWith(Config{URL: "http://localhost:7777/api"})
_, err := c.LogIn("test", "test")
if err != nil {
t.Fatalf("login: %s", err)
}
tests := []struct {
name string
AName string
ASlug string
AOrg string
}{
{
name: "good",
AName: "Bob Contrib",
ASlug: "bob",
AOrg: "write-as",
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
_, err = c.CreateContributor(&AuthorParams{
Name: test.AName,
Slug: test.ASlug,
OrgAlias: test.AOrg,
})
if err != nil {
t.Fatalf("create %s: %s", test.name, err)
}
})
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 14, 3:45 AM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3534112

Event Timeline