1
0
mirror of https://github.com/danog/gojekyll.git synced 2024-12-03 14:17:47 +01:00
gojekyll/pages/drops_test.go

20 lines
516 B
Go
Raw Normal View History

2017-07-07 01:31:36 +02:00
package pages
import (
"testing"
"github.com/osteele/gojekyll/config"
"github.com/stretchr/testify/require"
)
func TestPage_ToLiquid(t *testing.T) {
cfg := config.Default()
page, err := NewFile("testdata/excerpt.md", containerFake{cfg, ""}, "excerpt.md", map[string]interface{}{})
require.NoError(t, err)
drop := page.ToLiquid()
excerpt := drop.(map[string]interface{})["excerpt"]
// FIXME the following probably isn't right
// TODO also test post-rendering.
require.Equal(t, "First line.", excerpt)
}