found better check for unit test fixes

This commit is contained in:
Mads Rasmussen
2017-09-11 14:35:17 +02:00
parent 082e399293
commit 3e3a180fe4
4 changed files with 7 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ describe('edit content controller tests', function () {
it('it should have an content object', function() {
//controller should have a content object
expect(scope.content).toBeTruthy();
expect(scope.content).not.toBeUndefined();
//if should be the same as the routeParams defined one
expect(scope.content.id).toBe(1234);

View File

@@ -41,7 +41,7 @@ describe('edit media controller tests', function () {
it('it should have an media object', function() {
//controller should have a content object
expect(scope.content).toBeTruthy();
expect(scope.content).not.toBeUndefined();
//if should be the same as the routeParams defined one
expect(scope.content.id).toBe(1234);

View File

@@ -59,19 +59,19 @@ describe('Content picker controller tests', function () {
};
it('should define the default properties on construction', function () {
expect(scope.model.value).toBeTruthy();
expect(scope.model.value).not.toBeUndefined();
});
it("should populate scope.renderModel", function(){
expect(scope.renderModel).toBeTruthy();
expect(scope.renderModel).not.toBeUndefined();
expect(scope.renderModel.length).toBe(3);
});
it("Each rendermodel item should contain name, id and icon", function(){
var item = scope.renderModel[0];
expect(item.name).toBeTruthy();
expect(item.name).not.toBeUndefined();
expect(item.id).toBe(1233);
expect(item.icon).toBeTruthy();
expect(item.icon).not.toBeUndefined();
});
it("Removing an item should update renderModel, ids and model.value", function(){

View File

@@ -36,7 +36,7 @@ describe('content factory tests', function () {
$rootScope.$digest();
$httpBackend.flush();
expect(doc).toBeTruthy();
expect(doc).not.toBeUndefined();
expect(doc.id).toBe(1234);
});