Skip to content

Commit 98136c5

Browse files
author
Ryan Roden-Corrent
committed
Assert remote urls before setting push url
1 parent 63afd18 commit 98136c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

LibGit2Sharp.Tests/RemoteFixture.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ public void CanSetRemotePushUrl()
110110
Remote remote = repo.Network.Remotes[name];
111111
Assert.NotNull(remote);
112112

113+
// before setting push, both push and fetch urls should match
114+
Assert.Equal(url, remote.Url);
115+
Assert.Equal(url, remote.PushUrl);
116+
113117
Remote updatedremote = repo.Network.Remotes.Update(remote,
114118
r => r.PushUrl = pushurl);
115119

0 commit comments

Comments
 (0)