Index: tests/ms.php
===================================================================
--- tests/ms.php	(revision 1069)
+++ tests/ms.php	(working copy)
@@ -556,6 +556,21 @@
 		$this->assertEquals( false, wp_cache_get( $key, 'blog-id-cache' ) );
 		$this->assertEquals( 0, get_blog_id_from_url( $details->domain, $details->path ) );
 	}
+
+	function test_is_main_site() {
+		$this->assertTrue( is_main_site() );
+		$this->assertTrue( is_main_site( get_current_blog_id() ) );
+
+		$user_id = $this->factory->user->create( array( 'role' => 'administrator' ) );
+		$blog_id = $this->factory->blog->create( array( 'user_id' => $user_id ) );
+
+		switch_to_blog( $blog_id  );
+		$this->assertFalse( is_main_site( $blog_id ) );
+		$this->assertFalse( is_main_site( get_current_blog_id() ) );
+		$this->assertFalse( is_main_site() );
+
+		restore_current_blog();
+	}
 }
 
 endif;
