[Git] IDEA-59587 again. Moved New files are marked as not changed.
[idea/community.git] / plugins / git4idea / tests / git4idea / tests / GitChangeProviderTest.java
index e89f1b3ba74649777ba5142f82d8f5cb1e577a09..2aa33f4adc3510023bd3c4eb2c2805d18d1be83c 100644 (file)
@@ -105,6 +105,13 @@ public class GitChangeProviderTest extends GitSingleUserTest {
     assertChanges(new VirtualFile[] { myFiles.get("dir/c.txt"), myFiles.get("dir/subdir/d.txt") }, new FileStatus[] { DELETED, DELETED });
   }
 
+  @Test
+  public void testMoveNewFile() throws Exception {
+    VirtualFile file = myRepo.createFile("new.txt");
+    moveFileInCommand(file, myRepo.getDir().findChild("dir"));
+    assertChanges(file, ADDED);
+  }
+
   @Test
   public void testSimultaneousOperationsOnMultipleFiles() throws Exception {
     VirtualFile dfile = myFiles.get("dir/subdir/d.txt");