mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 10:30:03 -03:30
more unit test code that doens't work and fixing jshint
This commit is contained in:
parent
5de93aa05c
commit
bd95aebe36
@ -463,7 +463,7 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
||||
// correct anything that was out of sync from the job run
|
||||
jobResultsService.getJobData($scope.job.id).then(function(data){
|
||||
$scope.job = data;
|
||||
})
|
||||
});
|
||||
}
|
||||
} else if (parseInt(data.project_id, 10) ===
|
||||
parseInt($scope.job.project,10)) {
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
*************************************************/
|
||||
|
||||
|
||||
export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErrors', 'InitiatePlaybookRun', 'GetBasePath', function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, InitiatePlaybookRun, GetBasePath) {
|
||||
export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErrors', 'InitiatePlaybookRun', 'GetBasePath', 'Alert',
|
||||
function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, InitiatePlaybookRun, GetBasePath, Alert) {
|
||||
var val = {
|
||||
// the playbook_on_stats event returns the count data in a weird format.
|
||||
// format to what we need!
|
||||
|
||||
@ -29,8 +29,6 @@ describe('Controller: jobResultsController', () => {
|
||||
data: {foo: "bar"}
|
||||
};
|
||||
|
||||
moment = function(){};
|
||||
|
||||
let provideVals = () => {
|
||||
angular.mock.module('jobResults', ($provide) => {
|
||||
ParseTypeChange = jasmine.createSpy('ParseTypeChange');
|
||||
@ -60,10 +58,15 @@ describe('Controller: jobResultsController', () => {
|
||||
'encodeQueryset'
|
||||
]);
|
||||
|
||||
moment = jasmine.createSpyObj('moment', [
|
||||
'diff'
|
||||
moment = jasmine.createSpyObj('momentStub', [
|
||||
'diff'
|
||||
]);
|
||||
|
||||
spyOn(window, 'moment').andReturn(momentStub);
|
||||
// spyOn(window, 'moment').and.callFake(function (date) {
|
||||
// return {
|
||||
// diff: function (diff) { /* your format implementation */ }
|
||||
// };
|
||||
// });
|
||||
$provide.value('jobData', jobData);
|
||||
$provide.value('jobDataOptions', jobDataOptions);
|
||||
$provide.value('jobLabels', jobLabels);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user