(t *testing.T)
| 98 | } |
| 99 | |
| 100 | func 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 | |
| 109 | func TestSaveToken(t *testing.T) { |
| 110 | const p = "./test-fixtures/temp_test_token.json" |
nothing calls this directly
no test coverage detected