Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for batch change create response #80

Open
britneywright opened this issue Nov 15, 2019 · 0 comments
Open

Add test for batch change create response #80

britneywright opened this issue Nov 15, 2019 · 0 comments

Comments

@britneywright
Copy link
Contributor

Wer're only validating the status currently because the output and fixture formatting are not matching.

Intended test was:

@test "batch-change-create" {
  run $ew batch-change-create \
    --json "$(cat tests/fixtures/batch_change_create_json)"

  fixture="$(cat tests/fixtures/batch_change_create)"

  [ "$status" -eq 0 ]
  [ "${output}" = "${fixture}" ]
}

The most recent iteration of the the batch_change_create fixture I made was:

+--------------------+-------------------------------+
| ID                 |
+--------------------+-------------------------------+
| UserName           |
+--------------------+-------------------------------+
| UserID             |
+--------------------+-------------------------------+
| Status             | PendingProcessing             |
+--------------------+-------------------------------+
| Comments           | request on behalf of someone. |
+--------------------+-------------------------------+
| Changes            |
|                    |
|                    |
|                    |
|                    |
|                    |
|                    |
|                    |
|                    |
|                    |
+--------------------+-------------------------------+
| CreatedTimestamp   |
+--------------------+-------------------------------+
| OwnerGroupID       |
+--------------------+-------------------------------+
| ApprovalStatus     | AutoApproved                  |
+--------------------+-------------------------------+
| ReviewerID         |                               |
+--------------------+-------------------------------+
| ReviewerUserName   |                               |
+--------------------+-------------------------------+
| ReviewerTimestamp  |                               |
+--------------------+-------------------------------+
| ReviewComment      |                               |
+--------------------+-------------------------------+
| ScheduledTime      |                               |
+--------------------+-------------------------------+
| CancelledTimestamp |                               |
+--------------------+-------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant