mirror of
https://github.com/danog/liquid.git
synced 2024-11-27 06:34:45 +01:00
18 lines
301 B
Go
18 lines
301 B
Go
package liquid
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
type dropTest struct{}
|
|
|
|
func (d dropTest) ToLiquid() interface{} { return "drop" }
|
|
|
|
func TestDrops(t *testing.T) {
|
|
require.Equal(t, "drop", FromDrop(dropTest{}))
|
|
|
|
require.Equal(t, "not a drop", FromDrop("not a drop"))
|
|
}
|