add jira edit tests

This commit is contained in:
Cory Bennett
2017-09-17 20:33:40 -07:00
parent 4c6b36c83a
commit e4c10be811
2 changed files with 41 additions and 2 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ user: gojira
project: BASIC
queries:
todo: |
todo: >-
resolution = unresolved {{if .project}}AND project = '{{.project}}'{{end}} AND status = 'To Do'
custom-commands:
+40 -1
View File
@@ -4,7 +4,7 @@ cd $(dirname $0)
jira="../jira"
. env.sh
PLAN 88
PLAN 94
# reset login
RUNS $jira logout
@@ -73,6 +73,45 @@ DIFF <<EOF
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
EOF
###############################################################################
## Edit an issue
###############################################################################
RUNS $jira edit $issue -m "edit comment" --override priority=High --noedit
DIFF <<EOF
OK $issue $ENDPOINT/browse/$issue
EOF
###############################################################################
## Edit multiple issues with query
###############################################################################
RUNS $jira edit -m "bulk edit comment" --override priority=High --noedit --query "resolution = unresolved AND project = 'BASIC' AND status = 'To Do'"
DIFF <<EOF
OK $issue $ENDPOINT/browse/$issue
EOF
RUNS $jira $issue
DIFF <<EOF
issue: $issue
created: a minute ago
status: To Do
summary: summary
project: BASIC
issuetype: Bug
assignee: gojira
reporter: gojira
priority: High
votes: 0
description: |
description
comments:
- | # gojira, a minute ago
edit comment
- | # gojira, a minute ago
bulk edit comment
EOF
###############################################################################
## Try to close the issue, bug Basic projects do not allow that state
###############################################################################