YTSFlix_Go/youtube/youtube_test.go

20 lines
378 B
Go
Raw Normal View History

2018-11-04 14:58:15 +00:00
package youtube
import (
"fmt"
"github.com/stretchr/testify/assert"
"testing"
)
func TestGet(t *testing.T) {
u, err := Get("https://www.youtube.com/watch?v=1rZ-JorHJEY")
assert.NoError(t, err)
assert.NotEmpty(t, u)
fmt.Println(u)
}
func TestDownload(t *testing.T) {
err := Download("https://www.youtube.com/watch?v=1rZ-JorHJEY", "test.mp4")
assert.NoError(t, err)
}