Skip to content

Commit

Permalink
test: add two test_pr_title_custom_template skip
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Sep 9, 2024
1 parent 324448c commit ad3549c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/unit/pr_title_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,27 @@ function test_pr_title_no_template() {
assert_same "" "$actual"
}

function test_pr_title_custom_template() {
function test_pr_title_custom_template_with_ticket_key_number_title() {
export PR_TITLE_TEMPLATE='[{{TICKET_NUMBER}}-{{ TICKET_KEY }}]: {{ PR_TITLE }} 🏗️'
actual=$(pr_title "feat/TICKET-0000-my-new-2nd-feature")

assert_same "[0000-TICKET]: My new 2nd feature 🏗️" "$actual"
}

function test_pr_title_custom_template_with_ticket_number_title() {
skip
export PR_TITLE_TEMPLATE='[{{TICKET_NUMBER}}]: {{ PR_TITLE }} 🏗️'
actual=$(pr_title "feat/123-my-new-2nd-feature")
# assert_same "[123]: My new 2nd feature 🏗️" "$actual"
}

function test_pr_title_custom_template_with_ticket_key_title() {
skip
export PR_TITLE_TEMPLATE='[{{TICKET_KEY}}]: {{ PR_TITLE }} 🏗️'
actual=$(pr_title "feat/KEY-my-new-2nd-feature")
# assert_same "[KEY]: My new 2nd feature 🏗️" "$actual"
}

function test_pr_title_with_underscores_no_prefix() {
actual=$(pr_title "add_pr_create_script")

Expand Down

0 comments on commit ad3549c

Please sign in to comment.