/*globals it, describe, beforeEach, inject, expect */
'use strict';

describe('ContentController', function () {
  beforeEach(module('webapp.articles'));

  it('should get articles on start', inject(function () {
    expect(1).toEqual(1);
  }));

//  it('should ....', inject(function() {
    //spec body
//  }));
});
/*globals it, describe, beforeEach, inject, expect */
'use strict';

describe('ContentController', function () {
  var $scope, $rootScope, createController, articleService, messageService;

  beforeEach(module('webapp.articles'));

  beforeEach(inject(function ($injector) {
    $rootScope = $injector.get('$rootScope');
    $scope = $rootScope.$new();

    articleService = {
      getArticles : function (callback) {}
    };
    messageService = {};

    var $controller = $injector.get('$controller');

    createController = function () {
      return $controller('ContentCtrl', {
        '$scope': $scope,
        'ArticleService': articleService,
        'Version' : '1',
        'MessageService': messageService
      });
    };
  }));


  it('no edit during startup possible', inject(function () {
    var controller = createController();
    expect($scope.underEdit).toEqual(false);
  }));

  it('should set version depending on injected version', inject(function () {
    var controller = createController();
    expect($scope.contentVersion).toEqual('1');
  }));

//  it('should ....', inject(function() {
    //spec body
//  }));
});
Change test basic construct for ContentCtrlTest
Change test basic construct for ContentCtrlTest

The test tests only the ContentCtrl as a unit test, and therefore all
other components will be injected with newly created objects or mock
objects.

Currently two tests exist testing the per default set scope variables
which are used to control the flow on the page.
