MCPcopy Create free account
hub / github.com/exercism/cli / TestSubmitWithoutToken

Function TestSubmitWithoutToken

cmd/submit_test.go:22–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20)
21
22func TestSubmitWithoutToken(t *testing.T) {
23 cfg := config.Config{
24 Persister: config.InMemoryPersister{},
25 UserViperConfig: viper.New(),
26 }
27
28 err := runSubmit(cfg, pflag.NewFlagSet("fake", pflag.PanicOnError), []string{})
29 if assert.Error(t, err) {
30 assert.Regexp(t, "Welcome to Exercism", err.Error())
31 assert.Regexp(t, "exercism.org/settings", err.Error())
32 }
33}
34
35func TestSubmitWithoutWorkspace(t *testing.T) {
36 v := viper.New()

Callers

nothing calls this directly

Calls 2

runSubmitFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected