text: /*!
   Copyright (C) 2017 Google Inc.
   Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
   */
  
  describe('CMS.Controllers.TreeView', function () {
    'use strict';
  
    var Ctrl;  // the controller under test
  
    beforeAll(function () {
      Ctrl = CMS.Controllers.TreeView;
    });
  
    describe('init() method', function () {
      var ctrlInst;  // fake controller instance
      var dfdSingleton;
      var method;
      var options;
      var $element;
  
      beforeEach(function () {
        options = {};
        $element = $('<div></div>');
  
        ctrlInst = {
          element: $element,
          widget_hidden: jasmine.createSpy('widget_hidden'),
          widget_shown: jasmine.createSpy('widget_shown'),
          options: new can.Map(options)
        };
  
        method = Ctrl.prototype.init.bind(ctrlInst);
  
        dfdSingleton = new can.Deferred();
        spyOn(
          CMS.Models.DisplayPrefs, 'getSingleton'
        ).and.returnValue(dfdSingleton);
      });
  
      // test cases here...
    });
  });
  