[Test] public void Issue_839__Git_Commit_for_users_and_articles_is_broken_in_3_5() { var pathUserData = tmFileStorage.path_UserData().assert_Folder_Exists(); pathUserData.isGitRepository().assert_True(); var nGit = pathUserData.git_Open(); var size_Before = nGit.commits().size(); ieTeamMentor.open_TBot_Login_if_Needed(); nGit.commits().assert_Size_Is(size_Before); tmProxy.invoke_Instance(typeof(TM_StartUp), "Application_Start"); // restart TM nGit.commits().assert_Size_Is(size_Before + 1); }
//workflows [Test] public void Check_Non_Git_Repo_Doesnt_Commit() { tmServer.assert_Not_Null().Git.UserData_Git_Enabled = false; var temp_Path_UserData = "nonGitRepo".tempDir(); tmFileStorage.Path_UserData = temp_Path_UserData; tmFileStorage.path_UserData().assert_Folder_Exists() .assert_Folder_Empty() .assert_Is(temp_Path_UserData); admin.assert(() => tmFileStorage.load_UserData()); tmFileStorage.users_XmlFile_Location().assert_Folder_Exists() // before we create the default admin user (below) .assert_Folder_Empty(); // there should be no files in the userData's user's folder userData.tmUsers().assert_Empty(); manageUsers.assert(() => userData.createDefaultAdminUser()); tmFileStorage.users_XmlFile_Location().assert_Folder_Has_Files() // now there should be files in the userData's user's folder .files().assert_Size_Is(1) .first().fileName().assert_Starts("admin"); userData.tmUsers().assert_Size_Is(1); userData.tmUser("admin").assert_Not_Null(); tmFileStorage.path_UserData().assert_False(path => path.isGitRepository()) .files().assert_Not_Empty() .first().parentFolder().assert_Folder_File_Count_Is(1) .files(true).assert_Size_Is(2); Files.delete_Folder_Recursively(tmFileStorage.path_UserData()) .assert_True("UserData Folder failed to delete"); tmFileStorage.path_UserData().assert_Folder_Doesnt_Exist(); tmServer.assert_Not_Null().Git.UserData_Git_Enabled = true; }