~makyo/juju-gui/rel-prep

« back to all changes in this revision

Viewing changes to test/test_model_handlers.js

  • Committer: Benjamin Saller
  • Author(s): Benjamin Saller
  • Date: 2013-10-10 17:06:41 UTC
  • mfrom: (1108.2.4 restore-bundle-annotations)
  • Revision ID: bcsaller@gmail.com-20131010170641-igy2gv5i6qsinl4s
Fix annotations on go backend

Fix annotation roundtrips with go backend
      Splits how we prepare deltas for py/go juju fakebackends
      Change test expectations to merge updateAnnotation calls
  
  Fix import of constraints
  Fix export of undefined/default values
  
  Adjust simulator unit count rate of change.

R=benjamin.saller, gary.poster, jeff.pihach
CC=
https://codereview.appspot.com/14485046

Show diffs side-by-side

added added

removed removed

Lines of Context:
563
563
 
564
564
      it('correctly updates annotations', function() {
565
565
        var initial = {'gui-x': '42'},
566
 
            expected = {'gui-y': '47', 'gui-z': 'Now in 3D!'};
 
566
            next = {'gui-y': '47', 'gui-z': 'Now in 3D!'},
 
567
            expected = {'gui-x': '42', 'gui-y': '47', 'gui-z': 'Now in 3D!'};
567
568
        db.services.add({id: 'django', annotations: initial});
568
569
        var change = {
569
570
          Tag: 'service-django',
570
 
          Annotations: expected
 
571
          Annotations: next
571
572
        };
572
573
        annotationInfo(db, 'change', change);
573
574
        // Retrieve the annotations from the database.
574
575
        var service = db.services.getById('django');
 
576
        // we can see that it merged initial and next.
575
577
        assert.deepEqual(expected, service.get('annotations'));
576
578
      });
577
579