Commit 048bb760 authored by santiaago's avatar santiaago
Browse files

test draw/square/ randomGradientGridSVG and randomGridSVG

parent d9c65746
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
package squares

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

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

}

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

}