ref #44776 Removed the test for deleteRef method

* as we don't use stub in test
This commit is contained in:
Ryuichi Inagaki
2018-04-11 20:03:39 +10:00
parent 6b7a644082
commit a02823851b

View File

@@ -6,9 +6,8 @@
'use strict';
import 'mocha';
import { Git, GitStatusParser, Repository, parseGitCommit, parseGitmodules } from '../git';
import { GitStatusParser, parseGitCommit, parseGitmodules } from '../git';
import * as assert from 'assert';
import * as sinon from 'sinon';
suite('git', () => {
suite('GitStatusParser', () => {
@@ -214,18 +213,4 @@ This is a commit message.`;
});
});
});
suite('Repository', () => {
suite('deleteRef', () => {
const spawnOption = {};
const git = sinon.createStubInstance(Git);
git.exec = sinon.spy();
const repository = new Repository(git, 'REPOSITORY_ROOT');
test('delete ref', async () => {
await repository.deleteRef('REF_TO_BE_DELETED');
assert.deepEqual(git.exec.args, [['REPOSITORY_ROOT', ['update-ref', '-d', 'REF_TO_BE_DELETED'], spawnOption]]);
});
});
});
});