package auditlog

import (
	"testing"
	"time"

	"github.com/smartystreets/goconvey/convey"
)

func TestDetails(t *testing.T) {
	now := time.Now()

	m := Details{
		"hello": "world",
		"this":  1,
		"that":  true,
		"well":  2.3,
		"emmm":  now,
	}.Build()

	convey.Convey("TestDetails", t, func() {
		convey.So(m["hello"], convey.ShouldEqual, "world")
		convey.So(m["this"], convey.ShouldEqual, "1")
		convey.So(m["that"], convey.ShouldEqual, "true")
		convey.So(m["well"], convey.ShouldStartWith, "2.3")
		convey.So(m["emmm"], convey.ShouldEqual, now.String())
		convey.So(m["hellolllll"], convey.ShouldEqual, "")
	})
}
