Index: phpunit/tests/user/capabilities.php
===================================================================
--- phpunit/tests/user/capabilities.php	(revision 27110)
+++ phpunit/tests/user/capabilities.php	(working copy)
@@ -525,6 +525,29 @@
 	}
 
 	/**
+	 * @ticket 27020
+	 */
+	function test_authorless_post() {
+
+		// Make a post without an author
+		$post = $this->factory->post->create( array( 'post_author' => 0, 'post_type' => 'post', 'post_status' => 'draft' ) );
+
+		// Add an editor and contributor
+		$editor = new WP_User( $this->factory->user->create( array( 'role' => 'editor' ) ) );
+		$contributor = new WP_User( $this->factory->user->create( array( 'role' => 'contributor' ) ) );
+
+		// editor can edit, view, and trash
+		$this->assertTrue( $editor->has_cap( 'edit_post', $post ) );
+		$this->assertTrue( $editor->has_cap( 'read_post', $post ) );
+		$this->assertTrue( $editor->has_cap( 'delete_post', $post ) );
+		// an contributor cannot
+		$this->assertFalse( $contributor->has_cap( 'edit_post', $post ) );
+		$this->assertFalse( $contributor->has_cap( 'read_post', $post ) );
+		$this->assertFalse( $contributor->has_cap( 'delete_post', $post ) );
+
+	}
+
+	/**
 	 * @ticket 16714
 	 */
 	function test_create_posts_caps() {
