1
0

auto_test.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright (C) 2014 The Syncthing Authors.
  2. //
  3. // This program is free software: you can redistribute it and/or modify it
  4. // under the terms of the GNU General Public License as published by the Free
  5. // Software Foundation, either version 3 of the License, or (at your option)
  6. // any later version.
  7. //
  8. // This program is distributed in the hope that it will be useful, but WITHOUT
  9. // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. // more details.
  12. //
  13. // You should have received a copy of the GNU General Public License along
  14. // with this program. If not, see <http://www.gnu.org/licenses/>.
  15. package auto_test
  16. import (
  17. "bytes"
  18. "testing"
  19. "github.com/syncthing/syncthing/internal/auto"
  20. )
  21. func TestAssets(t *testing.T) {
  22. assets := auto.Assets()
  23. idx, ok := assets["index.html"]
  24. if !ok {
  25. t.Fatal("No index.html in compiled in assets")
  26. }
  27. if !bytes.Contains(idx, []byte("<html")) {
  28. t.Fatal("No html in index.html")
  29. }
  30. }