-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
url-to-id
tests to a separate file
- Loading branch information
1 parent
764bd8f
commit a4fb7ea
Showing
2 changed files
with
25 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Feature: Get the post ID for a given URL | ||
|
||
Background: | ||
Given a WP install | ||
|
||
@daniel | ||
Scenario: Get the post ID for a given URL | ||
When I run `wp post get 1 --field=url` | ||
Then STDOUT should be: | ||
""" | ||
https://example.com/?p=1 | ||
""" | ||
And save STDOUT as {POST_URL} | ||
|
||
When I run `wp post url-to-id {POST_URL}` | ||
Then STDOUT should contain: | ||
""" | ||
1 | ||
""" | ||
|
||
When I try `wp post url-to-id 'https://example.com/?p=404'` | ||
Then STDERR should contain: | ||
""" | ||
Could not get post with url https://example.com/?p=404. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters