OSDN Git Service

A functional test for `wp theme path`
authorDaniel Bachhuber <d@danielbachhuber.com>
Tue, 20 Aug 2013 05:24:03 +0000 (22:24 -0700)
committerDaniel Bachhuber <d@danielbachhuber.com>
Tue, 20 Aug 2013 05:24:03 +0000 (22:24 -0700)
features/theme.feature

index a42199f..4231fc5 100644 (file)
@@ -68,3 +68,15 @@ Feature: Manage WordPress themes
     Then STDOUT should be a table containing rows:
       | name  | status   | update    | version   |
       | p2    | active   | available | 1.4.1     |
+
+  Scenario: Get the path of an installed theme
+    Given a WP install
+
+    When I run `wp theme install twentyeleven`
+    Then STDOUT should not be empty
+
+    When I run `wp theme path twentyeleven --dir`
+    Then STDOUT should contain:
+       """
+       wp-content/themes/twentyeleven
+       """