Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsomeoneigna <someoneigna@gmail.com>2014-05-05 00:00:50 +0400
committersomeoneigna <someoneigna@gmail.com>2014-05-05 00:00:50 +0400
commit9962cb8ffc3b301f97005d19e0b65bde6c60b896 (patch)
tree4abae933011a77f6e4ca2553ef441c912c19d780 /LibGit2Sharp.Tests
parent90155789aedd51bc8f2ccb122f48977bc0fccc66 (diff)
Make Network.ListReferences(Remote) accept Credentials
Add CanListRemoteReferencesWithCredentials() test.
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r--LibGit2Sharp.Tests/NetworkFixture.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/LibGit2Sharp.Tests/NetworkFixture.cs b/LibGit2Sharp.Tests/NetworkFixture.cs
index 3bb5db73..d1d221de 100644
--- a/LibGit2Sharp.Tests/NetworkFixture.cs
+++ b/LibGit2Sharp.Tests/NetworkFixture.cs
@@ -107,6 +107,29 @@ namespace LibGit2Sharp.Tests
}
}
+ [SkippableFact]
+ public void CanListRemoteReferencesWithCredentials()
+ {
+ InconclusiveIf(() => string.IsNullOrEmpty(Constants.PrivateRepoUrl),
+ "Populate Constants.PrivateRepo* to run this test");
+
+ string remoteName = "origin";
+
+ string repoPath = InitNewRepository();
+
+ using (var repo = new Repository(repoPath))
+ {
+ Remote remote = repo.Network.Remotes.Add(remoteName, Constants.PrivateRepoUrl);
+
+ var references = repo.Network.ListReferences(remote, Constants.PrivateRepoCredentials);
+
+ foreach (var directReference in references)
+ {
+ Assert.NotNull(directReference);
+ }
+ }
+ }
+
[Theory]
[InlineData(FastForwardStrategy.Default)]
[InlineData(FastForwardStrategy.NoFastFoward)]