File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -113,3 +113,45 @@ Feature: Update WordPress themes
113113 """
114114 Error: Can't find the requested theme's version 1.4.2 in the WordPress.org theme repository (HTTP code 404).
115115 """
116+
117+ Scenario : Error when both --minor and --patch are provided
118+ Given a WP install
119+
120+ When I try `wp theme update --patch --minor --all`
121+ Then STDERR should be:
122+ """
123+ Error: --minor and --patch cannot be used together.
124+ """
125+ And the return code should be 1
126+
127+ Scenario : Update a theme to its latest minor release
128+ Given a WP install
129+ And I run `wp theme install --force twentytwelve --version=2.5.4`
130+
131+ When I run `wp theme update twentytwelve --minor`
132+ Then STDOUT should contain:
133+ """
134+ Success: Updated 1 of 1 themes.
135+ """
136+
137+ When I run `wp theme get twentytwelve --field=version`
138+ Then STDOUT should be:
139+ """
140+ 2.6.1
141+ """
142+
143+ Scenario : Update a theme to its latest patch release
144+ Given a WP install
145+ And I run `wp theme install --force twentytwelve --version=0.5`
146+
147+ When I run `wp theme update twentytwelve --patch`
148+ Then STDOUT should contain:
149+ """
150+ Success: Updated 1 of 1 themes.
151+ """
152+
153+ When I run `wp theme get twentytwelve --field=version`
154+ Then STDOUT should be:
155+ """
156+ 0.5.2
157+ """
You can’t perform that action at this time.
0 commit comments