TestArrayToReadableOutput tests ArrayToReadableOutput
(t *testing.T)
| 231 | |
| 232 | // TestArrayToReadableOutput tests ArrayToReadableOutput |
| 233 | func TestArrayToReadableOutput(t *testing.T) { |
| 234 | assert := asrt.New(t) |
| 235 | |
| 236 | testSource := []string{ |
| 237 | "file1.conf", |
| 238 | "file2.conf", |
| 239 | } |
| 240 | expectation := ` |
| 241 | - file1.conf |
| 242 | - file2.conf |
| 243 | ` |
| 244 | res, _ := util.ArrayToReadableOutput(testSource) |
| 245 | assert.Equal(expectation, res) |
| 246 | |
| 247 | _, err := util.ArrayToReadableOutput([]string{}) |
| 248 | assert.EqualErrorf(err, "empty slice", "Expected error when passing an empty slice") |
| 249 | } |
| 250 | |
| 251 | // TestGetTimezone tests GetTimezone |
| 252 | func TestGetTimezone(t *testing.T) { |
nothing calls this directly
no test coverage detected