Skip to content

Commit

Permalink
test: fix changelog date in test
Browse files Browse the repository at this point in the history
  • Loading branch information
oknozor committed Nov 30, 2021
1 parent 477b6ac commit fbe02bb
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tests/cog_tests/changelog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,28 @@ fn get_changelog_range() -> Result<()> {
let changelog = changelog.get_output();
let changelog = &changelog.stdout;
let changelog = String::from_utf8_lossy(changelog.as_slice());
let today = Utc::today().naive_utc().to_string();

assert_eq!(
changelog.as_ref(),
formatdoc!(
"## 0.32.3 - 2021-11-09
"## 0.32.3 - {today}
#### Bug Fixes
- fix openssl missing in CD - (1c0d2e9) - oknozor
#### Documentation
- tag, conventional commit and license badges to readme - (da6f63d) - oknozor
#### Miscellaneous Chores
- **(version)** 0.32.3 - (0939f4c) - *oknozor*
- - -
## 0.32.2 - 2021-11-09
## 0.32.2 - {today}
#### Bug Fixes
- **(cd)** bump setup-rust-action to v1.3.3 - (5350b11) - *oknozor*
#### Documentation
- add corrections to README - (9a33516) - oknozor
#### Miscellaneous Chores
- **(version)** 0.32.2 - (ef4803b) - *oknozor*
- - -
## 0.32.1 - 2021-11-09
## 0.32.1 - {today}
#### Bug Fixes
- **(cd)** fix ci cross build command bin args - (7f04a98) - *oknozor*
#### Documentation
Expand All @@ -59,7 +60,7 @@ fn get_changelog_range() -> Result<()> {
#### Refactoring
- change config name to cog.toml - (d4aa61b) - oknozor
- - -
## 0.30.0 - 2021-11-09
## 0.30.0 - {today}
#### Continuous Integration
- **(cd)** fix publish action script - (d0d0ae9) - *oknozor*
#### Features
Expand All @@ -69,7 +70,8 @@ fn get_changelog_range() -> Result<()> {
- remove test generated dir - (a6fba9c) - oknozor
#### Tests
- **(cli)** add verify it tests - (9da7321) - *oknozor*
"
",
today = today
)
);
Ok(())
Expand Down Expand Up @@ -132,6 +134,7 @@ fn get_changelog_from_tagged_repo() -> Result<()> {
let changelog = changelog.get_output();
let changelog = &changelog.stdout;
let changelog = String::from_utf8_lossy(changelog.as_slice());
let today = Utc::today().naive_utc().to_string();

assert_eq!(
changelog.as_ref(),
Expand All @@ -140,12 +143,13 @@ fn get_changelog_from_tagged_repo() -> Result<()> {
#### Bug Fixes
- bug fix - ({commit_two}) - Tom
- - -
## 1.0.0 - 2021-11-09
## 1.0.0 - {today}
#### Features
- **(taef)** feature - ({commit_one}) - Tom
",
commit_one = &commit_one[0..7],
commit_two = &commit_two[0..7]
commit_two = &commit_two[0..7],
today = today
)
);
Ok(())
Expand Down

0 comments on commit fbe02bb

Please sign in to comment.