WordPress.org

Make WordPress Core

Changeset 1053 in tests


Ignore:
Timestamp:
09/27/12 12:49:44 (19 months ago)
Author:
ryan
Message:

publish_post tests. see #WP21288

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/user/capabilities.php

    r1038 r1053  
    478478        $this->assertFalse($author_2->has_cap('delete_post', $post)); 
    479479        $this->assertFalse($contributor->has_cap('delete_post', $post)); 
     480 
     481        // administrators, editors, and authors can publish it 
     482        $this->assertTrue($admin->has_cap('publish_post', $post)); 
     483        $this->assertTrue($author->has_cap('publish_post', $post)); 
     484        $this->assertTrue($editor->has_cap('publish_post', $post)); 
     485        $this->assertTrue($author_2->has_cap('publish_post', $post)); 
     486        // contributors can't 
     487        $this->assertFalse($contributor->has_cap('publish_post', $post)); 
    480488 
    481489        // Test meta authorization callbacks 
Note: See TracChangeset for help on using the changeset viewer.