Default mediaFolder should have Id = 0

This commit is contained in:
Deluan 2016-02-24 19:35:58 -05:00
parent 33c6535da9
commit 93f115d8e4
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ import (
type MediaFolderRepository struct {}
func (*MediaFolderRepository) GetAll() ([]*models.MediaFolder, error) {
mediaFolder := models.MediaFolder{Id: "1", Name: "iTunes Library", Path: beego.AppConfig.String("musicFolder")}
mediaFolder := models.MediaFolder{Id: "0", Name: "iTunes Library", Path: beego.AppConfig.String("musicFolder")}
result := make([]*models.MediaFolder, 1)
result[0] = &mediaFolder
return result, nil

View File

@ -20,7 +20,7 @@ func TestGetMusicFolders(t *testing.T) {
v := new(string)
err := xml.Unmarshal(w.Body.Bytes(), &v)
So(err, ShouldBeNil)
So(w.Body.String(), ShouldContainSubstring, `musicFolder id="1" name="iTunes Library"`)
So(w.Body.String(), ShouldContainSubstring, `musicFolder id="0" name="iTunes Library"`)
})
})
}