Prechádzať zdrojové kódy

test: add more cases for checkout_box_description_test (#1639)

Kelvin 2 rokov pred
rodič
commit
3eb1360324

+ 4 - 0
frontend/rust-lib/flowy-grid/src/services/field/type_options/checkbox_type_option/checkbox_tests.rs

@@ -16,11 +16,15 @@ mod tests {
         // the checkout value will be checked if the value is "1", "true" or "yes"
         // the checkout value will be checked if the value is "1", "true" or "yes"
         assert_checkbox(&type_option, "1", CHECK, &field_type, &field_rev);
         assert_checkbox(&type_option, "1", CHECK, &field_type, &field_rev);
         assert_checkbox(&type_option, "true", CHECK, &field_type, &field_rev);
         assert_checkbox(&type_option, "true", CHECK, &field_type, &field_rev);
+        assert_checkbox(&type_option, "TRUE", CHECK, &field_type, &field_rev);
         assert_checkbox(&type_option, "yes", CHECK, &field_type, &field_rev);
         assert_checkbox(&type_option, "yes", CHECK, &field_type, &field_rev);
+        assert_checkbox(&type_option, "YES", CHECK, &field_type, &field_rev);
 
 
         // the checkout value will be uncheck if the value is "false" or "No"
         // the checkout value will be uncheck if the value is "false" or "No"
         assert_checkbox(&type_option, "false", UNCHECK, &field_type, &field_rev);
         assert_checkbox(&type_option, "false", UNCHECK, &field_type, &field_rev);
         assert_checkbox(&type_option, "No", UNCHECK, &field_type, &field_rev);
         assert_checkbox(&type_option, "No", UNCHECK, &field_type, &field_rev);
+        assert_checkbox(&type_option, "NO", UNCHECK, &field_type, &field_rev);
+        assert_checkbox(&type_option, "0", UNCHECK, &field_type, &field_rev);
 
 
         // the checkout value will be empty if the value is letters or empty string
         // the checkout value will be empty if the value is letters or empty string
         assert_checkbox(&type_option, "abc", "", &field_type, &field_rev);
         assert_checkbox(&type_option, "abc", "", &field_type, &field_rev);