Fix GitResetTest

This commit is contained in:
Ivan Semenov
2017-11-15 16:02:37 +03:00
parent 6c9d7a7684
commit b90e8a567a
@@ -34,7 +34,7 @@ class GitResetTest : GitSingleRepoTest() {
assertSuccessfulNotification("Reset successful")
assertEquals("Branch is on incorrect point", oldHash.asString(), last())
assertEquals("VirtualFile wasn't refreshed", "initial\n", String(vf.contentsToByteArray()))
assertEquals("VirtualFile wasn't refreshed", "initial" + System.lineSeparator(), String(vf.contentsToByteArray()))
}
fun `test file status is refreshed on soft reset`() {
@@ -49,9 +49,9 @@ class GitResetTest : GitSingleRepoTest() {
}
private fun prepare(): Pair<Hash, VirtualFile> {
val file = file("f.txt").create().write("initial\n")
val file = file("f.txt").create().write("initial" + System.lineSeparator())
val prevHash = HashImpl.build(file.addCommit("created").hash())
file.append("more\n")
file.append("more" + System.lineSeparator())
file.addCommit("Added more")
val vf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file.file)!!
return Pair(prevHash, vf)