refactor: drop the quiz import and the golem15.quizzes dependency
golem15.quizzes now serves its own import at /api/v1/quizzes/import behind the same shared API token.
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
_ "git.golem15.com/golem15/sm-quizzes-plugin"
|
||||
_ "git.golem15.com/golem15/sm-user-plugin"
|
||||
"git.golem15.com/golem15/summercms/modules/backpack"
|
||||
"git.golem15.com/golem15/summercms/modules/bonfire"
|
||||
@@ -48,11 +47,10 @@ func testConfig(t *testing.T) *compass.Config {
|
||||
return cfg
|
||||
}
|
||||
|
||||
// activate boots the plugin and both declared dependencies the way the
|
||||
// generated main does.
|
||||
// activate boots golem15.user and jz.bm the way the generated main does.
|
||||
func activate(t *testing.T, app *backpack.App) []party.Plugin {
|
||||
t.Helper()
|
||||
plugins, err := party.Activate(app, []string{"golem15.user", "golem15.quizzes", "jz.bm"})
|
||||
plugins, err := party.Activate(app, []string{"golem15.user", "jz.bm"})
|
||||
if err != nil {
|
||||
t.Fatalf("Activate: %v", err)
|
||||
}
|
||||
@@ -73,7 +71,7 @@ func bmPlugin(t *testing.T, plugins []party.Plugin) *bm.Plugin {
|
||||
func TestPluginActivates(t *testing.T) {
|
||||
app := backpack.New(testConfig(t))
|
||||
p := bmPlugin(t, activate(t, app))
|
||||
if p.ID() != "jz.bm" || !slices.Equal(p.Requires(), []string{"golem15.user", "golem15.quizzes"}) {
|
||||
if p.ID() != "jz.bm" || !slices.Equal(p.Requires(), []string{"golem15.user"}) {
|
||||
t.Errorf("ID %q Requires %v", p.ID(), p.Requires())
|
||||
}
|
||||
if n := len(p.Models()); n != 10 {
|
||||
@@ -125,7 +123,6 @@ func TestRoutes(t *testing.T) {
|
||||
"POST /api/v1/bm/materials",
|
||||
"DELETE /api/v1/bm/materials/{id}",
|
||||
"POST /api/v1/bm/seed",
|
||||
"POST /api/v1/bm/quizzes",
|
||||
}
|
||||
var got []string
|
||||
sawFeed := false
|
||||
|
||||
Reference in New Issue
Block a user