Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mycaule committed Dec 26, 2014
1 parent 995ccac commit f1173b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"protractor": "~1.5.0",
"http-server": "~0.7.4",
"jasmine-core": "~2.1.3",
"angular": "~1.3.8",
"angular-mocks": "~1.3.8"
"angular": "~1.2.28",
"angular-mocks": "~1.2.28",
"angular-translate": "~2.5.2"
}
}
1 change: 1 addition & 0 deletions test/karma-conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = function(config) {
files: [
'node_modules/angular/angular.js',
'node_modules/angular-mocks/angular-mocks.js',
'node_modules/angular-translate/dist/angular-translate.js',
'salaryController.js',
'test/spec.js'
],
Expand Down
16 changes: 2 additions & 14 deletions test/spec.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
'use strict';

describe('calculator module', function() {

var scope = {};
var ctrl;
var translate;

beforeEach(module('calculator'));

beforeEach(inject(function(_$translate_) {
translate = function() {
translate.spy.apply(this, arguments);
};
translate.spy = function() {};
spyOn(translate, 'spy').andCallFake(function() {
// dummy
});
}));

beforeEach(inject(function($rootScope, $controller) {
scope = $rootScope.$new();
beforeEach(inject(function($controller, $rootScope) {
scope = $rootScope.$new();
ctrl = $controller('salaryController', {$scope: scope});
}));

Expand Down

0 comments on commit f1173b5

Please sign in to comment.