24 lines
560 B
Go
24 lines
560 B
Go
package drive
|
|
|
|
import "testing"
|
|
|
|
func TestBlankOfficeFileDrawing(t *testing.T) {
|
|
content, ct := blankOfficeFile(NewFileDrawing)
|
|
if content == nil || len(content) == 0 {
|
|
t.Fatal("expected blank excalidraw content")
|
|
}
|
|
if ct != "application/json" {
|
|
t.Fatalf("content type = %q, want application/json", ct)
|
|
}
|
|
}
|
|
|
|
func TestBlankOfficeFileUnknownKind(t *testing.T) {
|
|
content, ct := blankOfficeFile(NewFileKind("drawing"))
|
|
if content == nil {
|
|
t.Fatal("NewFileKind drawing should produce content")
|
|
}
|
|
if ct == "" {
|
|
t.Fatal("expected content type")
|
|
}
|
|
}
|