selectDropdownCtrl-specs.js 682 B

1234567891011121314151617181920212223242526272829303132
  1. define([
  2. 'directives/variableValueSelect',
  3. ],
  4. function () {
  5. 'use strict';
  6. describe("SelectDropdownCtrl", function() {
  7. var scope;
  8. var ctrl;
  9. beforeEach(module('grafana.controllers'));
  10. beforeEach(inject(function($controller, $rootScope) {
  11. scope = $rootScope.$new();
  12. ctrl = $controller('SelectDropdownCtrl', {$scope: scope});
  13. }));
  14. describe("Given simple variable", function() {
  15. beforeEach(function() {
  16. ctrl.variable = {current: {text: 'hej', value: 'hej' }};
  17. ctrl.init();
  18. });
  19. it("Should init labelText and linkText", function() {
  20. expect(ctrl.linkText).to.be("hej");
  21. });
  22. });
  23. });
  24. });