MCPcopy Create free account
hub / github.com/dinofizz/diskplayer / TestReadTokenFileError

Function TestReadTokenFileError

auth_test.go:100–107  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

98}
99
100func TestReadTokenFileError(t *testing.T) {
101 viper.Set("token.path", "./test-fixtures/not_a_real_path.json")
102 tok, err := ReadToken()
103 assert.Nil(t, tok)
104 assert.Error(t, err)
105 _, ok := err.(*os.PathError)
106 assert.True(t, ok)
107}
108
109func TestSaveToken(t *testing.T) {
110 const p = "./test-fixtures/temp_test_token.json"

Callers

nothing calls this directly

Calls 1

ReadTokenFunction · 0.85

Tested by

no test coverage detected