(test-begin "create") ;; If not set, tick will prompt for these fields. (define (fillers #!optional no-type) (let ((sb '("--summary" "s" "--body" ""))) (if no-type sb (append '("--type" "defect") sb)))) (test-error "Assert failure to create a ticket as assigned but without an owner" (tick `("create" ,@(fillers) "--status" "assigned"))) (test-error "Assert failure to create a ticket as new and with an owner" (tick `("create" ,@(fillers) "--status" "new" "--owner" ,(get-username)))) (test-error "Assert failure to accept a ticket on behalf of another user" (tick `("create" ,@(fillers) "--status" "accepted" "--owner" "bar" ))) (test-error "Assert failure to create a ticket as reopened" (tick `("create" ,@(fillers) "--status" "reopened"))) (test-error "Assert failure to create a ticket as closed" (tick `("create" ,@(fillers) "--status" "closed"))) (test-assert "Create a valid ticket" (string? (tick `("create" ,@(fillers) "--summary" "hello" "--body" "hello")))) (test-end "create") (test-exit)