add tests for themes

This commit is contained in:
miya0001 2016-12-15 15:23:42 +09:00
parent 257c3ec5d6
commit c2781c052d

View file

@ -54,6 +54,19 @@ Feature: WordPress code scaffolding
Success: Network enabled the 'Zombieland' theme.
"""

Scenario: Scaffold a child theme with invalid slug
Given a WP install
When I try `wp scaffold child-theme . --parent_theme=simple-life`
Then STDERR should contain:
"""
Error: Invalid theme slug specified.
"""
When I try `wp scaffold child-theme ../ --parent_theme=simple-life`
Then STDERR should contain:
"""
Error: Invalid theme slug specified.
"""

@tax @cpt
Scenario: Scaffold a Custom Taxonomy and Custom Post Type and write it to active theme
Given a WP install
@ -316,6 +329,19 @@ Feature: WordPress code scaffolding
Success: Switched to 'Starter-theme' theme.
"""

Scenario: Scaffold starter code for a theme with invalid slug
Given a WP install
When I try `wp scaffold _s .`
Then STDERR should contain:
"""
Error: Invalid theme slug specified.
"""
When I try `wp scaffold _s ../`
Then STDERR should contain:
"""
Error: Invalid theme slug specified.
"""

Scenario: Scaffold plugin and tests for non-standard plugin directory
Given a WP install