File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ def check_releases
125125 errors [ release ] << invalid_url_message ( release . post ) if release . post_url_invalid?
126126 errors [ release ] << "release date and post date do not match" if release . date_mismatch?
127127 errors [ release ] << missing_post_message ( release . post_filename ) if release . post_missing?
128+ errors [ release ] << "release date is a string, not a Date object" if release . date . is_a? ( String )
128129 end
129130 end
130131
Original file line number Diff line number Diff line change 5757 create_file ( "_data/releases.yml" , content )
5858 _ ( linter_output ) . must_match "release date and post date do not match"
5959 end
60+
61+ it "reports release data with wrong date format" do
62+ content = <<~YAML
63+ - version: 2.7.1
64+ date: '2020-01-01'
65+ post: /en/news/2020/01/01/post/
66+ YAML
67+
68+ create_file ( "_data/releases.yml" , content )
69+ _ ( linter_output ) . must_match "release date is a string, not a Date object"
70+ end
6071end
You can’t perform that action at this time.
0 commit comments