Skip to content

Commit 8c0aae8

Browse files
committed
Add test to confirm release-date can be anything
1 parent 307b583 commit 8c0aae8

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

tests/Feature/UpdateCommandTest.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,3 +340,24 @@
340340
->expectsOutput(file_get_contents(__DIR__ . '/../Stubs/expected-changelog-without-unreleased-with-heading-text.md'))
341341
->assertSuccessful();
342342
});
343+
344+
it('allows release date to be in any given format', function () {
345+
$this->artisan('update', [
346+
'--release-notes' => <<<MD
347+
### Added
348+
- New Feature A
349+
- New Feature B
350+
351+
### Changed
352+
- Update Feature C
353+
354+
### Removes
355+
- Remove Feature D
356+
MD,
357+
'--latest-version' => 'v1.0.0',
358+
'--path-to-changelog' => __DIR__ . '/../Stubs/base-changelog.md',
359+
'--release-date' => '::release-date::',
360+
])
361+
->expectsOutput(file_get_contents(__DIR__ . '/../Stubs/expected-changelog-different-date-format.md'))
362+
->assertSuccessful();
363+
});
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased](https://github.com/org/repo/compare/v1.0.0...HEAD)
9+
10+
Please do not update the unreleased notes.
11+
12+
<!-- Content should be placed here -->
13+
## [v1.0.0](https://github.com/org/repo/compare/v0.1.0...v1.0.0) - ::release-date::
14+
15+
### Added
16+
17+
- New Feature A
18+
- New Feature B
19+
20+
### Changed
21+
22+
- Update Feature C
23+
24+
### Removes
25+
26+
- Remove Feature D
27+
28+
## v0.1.0 - 2021-01-01
29+
30+
### Added
31+
32+
- Initial Release

0 commit comments

Comments
 (0)