Moved Stream logic to engine layer

This commit is contained in:
Deluan
2016-03-09 09:12:26 -05:00
parent 6d64d35564
commit 4d1a4613d9
3 changed files with 11 additions and 8 deletions
+30
View File
@@ -0,0 +1,30 @@
package engine
import (
"testing"
. "github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey"
)
func TestDownsampling(t *testing.T) {
Init(t, false)
Convey("Subject: createDownsamplingCommand", t, func() {
Convey("It should create a valid command line", func() {
cmd, args := createDownsamplingCommand("/music library/file.mp3", 128)
So(cmd, ShouldEqual, "ffmpeg")
So(args[0], ShouldEqual, "-i")
So(args[1], ShouldEqual, "/music library/file.mp3")
So(args[2], ShouldEqual, "-b:a")
So(args[3], ShouldEqual, "128k")
So(args[4], ShouldEqual, "mp3")
So(args[5], ShouldEqual, "-")
})
})
}