- Page/PageMeta emit {data, meta} with no links key
- RegisterJoinTable fails loud on nil db; document pivot-write contract
17 lines
291 B
Go
17 lines
291 B
Go
package lagoon
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestRegisterJoinTableNilDB(t *testing.T) {
|
|
err := RegisterJoinTable(nil, struct{}{}, "Artists", struct{}{})
|
|
if err == nil {
|
|
t.Fatal("want non-nil error")
|
|
}
|
|
if !strings.Contains(err.Error(), "nil") {
|
|
t.Fatalf("got %v", err)
|
|
}
|
|
}
|