Skip to content

Commit 10391c0

Browse files
Add tests for expected archival behavior
1 parent 267ee99 commit 10391c0

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

features/dist-archive.feature

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
Feature: Generate a distribution archive of a project
22

3-
Scenario: WP-CLI loads for your tests
3+
Scenario: Generates a ZIP archive by default
44
Given a WP install
55

6-
When I run `wp eval 'echo "Hello world.";'`
7-
Then STDOUT should contain:
8-
"""
9-
Hello world.
10-
"""
6+
When I run `wp scaffold plugin hello-world`
7+
Then the wp-content/plugins/hello-world directory should exist
8+
And the wp-content/plugins/hello-world/hello-world.php file should exist
9+
And the wp-content/plugins/hello-world/.travis.yml file should exist
10+
And the wp-content/plugins/hello-world/bin directory should exist
11+
12+
When I run `wp dist-archive wp-content/plugins/hello-world`
13+
Then the wp-content/plugins/hello-world.zip file should exist
14+
15+
When I run `wp plugin delete hello-world`
16+
Then the wp-content/plugins/hello-world directory should not exist
17+
18+
When I run `wp plugin install wp-content/plugins/hello-world.zip`
19+
Then the wp-content/plugins/hello-world directory should exist
20+
And the wp-content/plugins/hello-world/hello-world.php file should exist
21+
And the wp-content/plugins/hello-world/.travis.yml file should not exist
22+
And the wp-content/plugins/hello-world/bin directory should not exist

0 commit comments

Comments
 (0)