TEST(CollectionOptions, IsValid) { CollectionOptions options; ASSERT_TRUE(options.isValid()); options.storageEngine = fromjson("{storageEngine1: 1}"); ASSERT_FALSE(options.isValid()); }
TEST(CollectionOptions, CollationFieldParsesCorrectly) { CollectionOptions options; ASSERT_OK(options.parse(fromjson("{collation: {locale: 'en'}}"))); ASSERT_EQ(options.collation, fromjson("{locale: 'en'}")); ASSERT_TRUE(options.isValid()); ASSERT_OK(options.validate()); }