Skip to content

Commit f8041c0

Browse files
committed
chore: added rename test to svnRepository test
1 parent 3358b13 commit f8041c0

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/test/svnRepository.test.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ suite("Svn Repository Tests", () => {
1818
svn = null;
1919
});
2020

21-
test("Test removeAbsolutePath", async () => {
21+
test("Test getStatus", async () => {
2222
svn = new Svn(options);
2323
const repository = new Repository(svn, "/tmp", "/tpm");
2424
repository.exec = async (args: string[], options?: ICpOptions) => {
@@ -35,4 +35,25 @@ suite("Svn Repository Tests", () => {
3535
assert.equal(status[1].path, "newfiletester.php");
3636
assert.equal(status[2].path, "added.php");
3737
});
38+
39+
test("Test rename", async () => {
40+
svn = new Svn(options);
41+
const repository = new Repository(svn, "/tmp", "/tpm");
42+
repository.exec = async (args: string[], options?: ICpOptions) => {
43+
assert.equal(args[0].includes("rename"), true);
44+
assert.equal(args[1].includes("test.php"), true);
45+
assert.equal(args[2].includes("tester.php"), true);
46+
47+
return {
48+
exitCode: 1,
49+
stderr: "",
50+
stdout: `
51+
A test.php
52+
D tester.php
53+
`
54+
};
55+
};
56+
57+
await repository.rename("test.php", "tester.php");
58+
});
3859
});

0 commit comments

Comments
 (0)