Skip to content

Commit

Permalink
Merge pull request #7 from mindmelting/update-tests
Browse files Browse the repository at this point in the history
Updated tests
  • Loading branch information
maseh87 committed Nov 18, 2014
2 parents 9d2ff8e + cc4e1bd commit 6488181
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 34 deletions.
12 changes: 8 additions & 4 deletions specs/directives/load-directiveSpec.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
describe('load-directive', function() {
var $scope, element, isolate;
var $scope, $element, isolate;
beforeEach(module('ngLoading'));
beforeEach(inject(function($rootScope, $compile) {
$scope = $rootScope.$new();
element = '<loader></loader>';
element = $compile(element)($scope);
$element = angular.element('<loader></loader>');
$compile($element)($scope);
$scope.$digest();
isolate = element.isolateScope();
isolate = $element.isolateScope();
}));

it('should have isolate scope', function() {
expect(isolate).to.be.an('object');
});

it('should have a child element with a default class of load-bar-inbox', function() {
expect($element.children().hasClass('load-bar-inbox')).to.be(true);
});

});
25 changes: 0 additions & 25 deletions specs/provider/configSpec.js

This file was deleted.

7 changes: 2 additions & 5 deletions specs/provider/ng-loadingSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,18 @@ describe('loadingProvider', function() {
module('ngLoading', 'test-app');
//make the injectors register again
inject(function(){});

config = provider.$get();
});

it('should exist', function() {
config = provider.$get();
expect(provider).to.not.be(null);
});

it('should have a load method', function() {
expect(provider.load).to.be.a('function');
});

it('should return a config object', function() {
// expect(provider.load).to.be.an('object');
});

it('should return an object', function() {
expect(config).to.be.an('object');
});
Expand Down

0 comments on commit 6488181

Please sign in to comment.