spec 'add_key imports from attached quoted-printable key-material (as produced by Thunderbird 115)' fails due to expired key
Failures:
1) Schleuder::KeywordHandlers::KeyManagement.add_key imports from attached quoted-printable key-material (as produced by Thunderbird 115)
Failure/Error: expect(output).to eql("This key was newly added:\n0x769B651054DB697FEB26E408717574BD0A6591ED paz@schleuder.org 2018-10-16 [expires: 2024-03-16]\n")
expected: "This key was newly added:\n0x769B651054DB697FEB26E408717574BD0A6591ED paz@schleuder.org 2018-10-16 [expires: 2024-03-16]\n"
got: "This key was newly added:\n0x769B651054DB697FEB26E408717574BD0A6591ED paz@schleuder.org 2018-10-16 [expired: 2024-03-16]\n"
(compared using eql?)
Diff:
@@ -1,3 +1,3 @@
This key was newly added:
-0x769B651054DB697FEB26E408717574BD0A6591ED paz@schleuder.org 2018-10-16 [expires: 2024-03-16]
+0x769B651054DB697FEB26E408717574BD0A6591ED paz@schleuder.org 2018-10-16 [expired: 2024-03-16]
# ./spec/schleuder/unit/keyword_handlers/key_management_spec.rb:142:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:64:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:63:in `block (2 levels) in <top (required)>'
This key is by now expired, which is why the above assumption fails, due to the different wording.
We could either pull in an update of this key, or relax the expected wording, i.e. accept both expires
and expired
and not match a specific date, but only the syntax, something like \d{4}-\d{2}-\d{2}\
. I would prefer the later, and we did similar fixes in the past.