-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from lumapps/chore/jira/fix_pattern
fix(jira): the jira pattern
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
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
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,23 @@ | ||
from changelog_generator.commit import Commit | ||
|
||
|
||
def test_no_reference(): | ||
commit = Commit("", "", "a commit without any reference") | ||
|
||
assert commit.jiras == [] | ||
|
||
|
||
def test_one_reference(): | ||
commit = Commit("", "", "this is a reference ABCD-1") | ||
|
||
assert commit.jiras == ["ABCD-1"] | ||
|
||
|
||
def test_several_reference(): | ||
commit = Commit( | ||
"", | ||
"", | ||
"valid references ABCD-1 AB-0001 FOO2-1, and not valid ones A-123 abc-145 ABC_524 ", | ||
) | ||
|
||
assert commit.jiras == ["ABCD-1", "AB-0001", "FOO2-1"] |