From afb94eb1d124c1b7ba4330d67f8528004e440bfc Mon Sep 17 00:00:00 2001 From: Azareal Date: Fri, 10 May 2019 13:52:37 +1000 Subject: [PATCH] Added tests for meta store. --- misc_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/misc_test.go b/misc_test.go index a9fa1100..7542c246 100644 --- a/misc_test.go +++ b/misc_test.go @@ -988,6 +988,17 @@ func TestPhrases(t *testing.T) { // TODO: Cover the other phrase types, also try switching between languages to see if anything strange happens } +func TestMetaStore(t *testing.T) { + m, err := c.Meta.Get("magic") + expect(t, m == "", "meta var should be empty") + recordMustNotExist(t, err, "meta var shouldn't exist") + err = c.Meta.Set("magic","lol") + expectNilErr(t,err) + m, err = c.Meta.Get("magic") + expectNilErr(t,err) + expect(t,m=="lol","meta var should be lol") +} + func TestWordFilters(t *testing.T) { // TODO: Test the word filters and their store expect(t, c.WordFilters.Length() == 0, "Word filter list should be empty")