Commits

Fredrik Johansson  committed c3a68eb

Adding failing unit tests for normalized lists problem

  • Participants
  • Parent commits 076f361

Comments (0)

Files changed (2)

File test/src/main/resources/protocol.xml

 
     <struct name="fourth" id="4" />
 
+    <struct name="fifth" id="5">
+        <list name="texts" type="string" />
+        <list name="numbers" type="uint32" />
+    </struct>
 </protocol>

File test/src/test/js/OdoboTranslation_spec.js

             expect(struct.classId()).toBe(4);
             var norm = struct.getNormalizedObject();
         });
+
+        it('fifth struct should work', function() {
+            var struct = new STYXTEST.Fifth();
+            struct.texts.push("AA");
+            struct.numbers.push(10);
+
+            var byteArray = struct.save();
+            expect(struct.classId()).toBe(5);
+            var norm = struct.getNormalizedObject();
+            expect(norm).not.toBeNull();
+        });
     });
 
     describe('Firebase API', function() {