Skip to content

Commit 822f94a

Browse files
committed
add test scenario
1 parent 9351158 commit 822f94a

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

features/plugin-install.feature

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,28 @@ Feature: Install WordPress plugins
145145
"""
146146
Warning: Destination folder already exists. "{WORKING_DIR}/wp-content/plugins/akismet/"
147147
"""
148+
149+
Scenario: Don't attempt to rename ZIPs coming from a GitHub archive release/tag
150+
Given a WP install
151+
152+
When I run `wp plugin install https://github.com/dseomn/dseomn-customizations-wp/archive/v0.0.2.zip`
153+
Then STDOUT should contain:
154+
"""
155+
Plugin installed successfully.
156+
"""
157+
And STDOUT should contain:
158+
"""
159+
package from https://github.com/dseomn/dseomn-customizations-wp/archive/v0.0.2.zip
160+
"""
161+
And STDOUT should contain:
162+
"""
163+
Renamed Github-based project from 'dseomn-customizations-wp-0.0.2' to 'dseomn-customizations-wp'.
164+
"""
165+
And STDOUT should contain:
166+
"""
167+
Plugin installed successfully.
168+
"""
169+
And STDERR should be empty
170+
And the wp-content/plugins/dseomn-customizations-wp directory should exist
171+
And the wp-content/plugins/dseomn-customizations-w directory should not exist
172+
And the wp-content/plugins/dseomn-customizations-wp-0.0.2 directory should not exist

0 commit comments

Comments
 (0)