Commit 36c88422ef7537f41bd24d3ace41ee0422e531ac

Arthur Schreiber 2012-06-02T16:48:12

Add a failing test case for git_remote_disconnect/git_remote_connected.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/tests-clar/network/remotelocal.c b/tests-clar/network/remotelocal.c
index 98abbbe..8cee7ce 100644
--- a/tests-clar/network/remotelocal.c
+++ b/tests-clar/network/remotelocal.c
@@ -90,6 +90,15 @@ static void connect_to_local_repository(const char *local_repository)
 
 }
 
+void test_network_remotelocal__connected(void)
+{
+	connect_to_local_repository(cl_fixture("testrepo.git"));
+	cl_assert(git_remote_connected(remote));
+
+	git_remote_disconnect(remote);
+	cl_assert(!git_remote_connected(remote));
+}
+
 void test_network_remotelocal__retrieve_advertised_references(void)
 {
 	int how_many_refs = 0;