Commit d48b8003 authored by santiaago's avatar santiaago
Browse files

test palette.go

parent 86622c56
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
package squares

import (
	"image"
	"net/http"
	"net/http/httptest"
	"testing"
)

func TestPalette(t *testing.T) {
	img := image.NewRGBA(image.Rect(0, 0, 10, 10))
	Palette(img, colorTheme)
}

func TestPaletteSVG(t *testing.T) {
	rec := httptest.NewRecorder()
	PaletteSVG(rec, colorTheme, 100, 10)
	if rec.Code != http.StatusOK {
		t.Errorf("returned %v. Expected %v.", rec.Code, http.StatusOK)
	}
}