This repository was archived by the owner on Mar 10, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/androidTest/java/com/couchbase/lite Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1313import java .io .ByteArrayInputStream ;
1414import java .io .File ;
1515import java .net .URL ;
16+ import java .util .ArrayList ;
1617import java .util .Arrays ;
1718import java .util .HashMap ;
1819import java .util .List ;
@@ -407,4 +408,25 @@ public void testAttachmentsWithEncryption() throws Exception {
407408 setEncryptedAttachmentStore (false );
408409 }
409410 }
411+
412+ // https://github.com/couchbase/couchbase-lite-android/issues/783
413+ public void testNonStringForTypeField () throws CouchbaseLiteException {
414+ // Non String as type
415+ List <Integer > type1 = new ArrayList ();
416+ type1 .add (0 );
417+ type1 .add (1 );
418+ Map <String , Object > props1 = new HashMap <String , Object >();
419+ props1 .put ("key" , "value" );
420+ props1 .put ("type" , type1 );
421+ Document doc1 = database .createDocument ();
422+ doc1 .putProperties (props1 );
423+
424+ // String as type
425+ String type2 = "STRING" ;
426+ Map <String , Object > props2 = new HashMap <String , Object >();
427+ props1 .put ("key" , "value" );
428+ props1 .put ("type" , type2 );
429+ Document doc2 = database .createDocument ();
430+ doc2 .putProperties (props1 );
431+ }
410432}
You can’t perform that action at this time.
0 commit comments