public void PushToCreateIsAllowedIfOptionIsSet()
{
ForAllGits(git =>
{
// Enable the push-to-create option
ITH.SetGlobalSetting(x => x.AllowPushToCreate, true);
// Create a repo locally
Directory.CreateDirectory(RepositoryDirectory);
InitRepository(git);
Environment.CurrentDirectory = RepositoryDirectory;
CreateIdentity(git);
CreateAndAddFiles(git);
RunGitOnRepo(git, "push origin master").ExpectSuccess();
// Ensure repo is created with same name as was pushed
Guid repoId = ITH.FindRepository(RepositoryName);
Assert.AreNotEqual(Guid.Empty, repoId);
});
}