renderer_test.go 677 B

1234567891011121314151617181920212223242526272829303132333435
  1. package renderer
  2. //
  3. // import (
  4. // "io/ioutil"
  5. // "os"
  6. // "testing"
  7. //
  8. // . "github.com/smartystreets/goconvey/convey"
  9. // )
  10. //
  11. // func TestPhantomRender(t *testing.T) {
  12. //
  13. // Convey("Can render url", t, func() {
  14. // tempDir, _ := ioutil.TempDir("", "img")
  15. // ipng, err := RenderToPng("http://www.google.com")
  16. // So(err, ShouldBeNil)
  17. // So(exists(png), ShouldEqual, true)
  18. //
  19. // //_, err = os.Stat(store.getFilePathForDashboard("hello"))
  20. // //So(err, ShouldBeNil)
  21. // })
  22. //
  23. // }
  24. //
  25. // func exists(path string) bool {
  26. // _, err := os.Stat(path)
  27. // if err == nil {
  28. // return true
  29. // }
  30. // if os.IsNotExist(err) {
  31. // return false
  32. // }
  33. // return false
  34. // }