Files
notifications-admin/app/assets/javascripts/cookieMessage.js
Tom Byers 6d620dd283 Fix timestamp used for clearing old cookies
The code in the test that added the 'old' cookies
uses Greenwich Mean Time (GMT) format:

https://github.com/alphagov/notifications-admin/blob/master/tests/javascripts/support/helpers/cookies.js#L19

The code that cleared any 'old' cookies doesn't
specify a time format so uses that set on the host
OS:

https://github.com/alphagov/notifications-admin/blob/master/app/assets/javascripts/cookieMessage.js#L12
https://github.com/alphagov/notifications-admin/blob/master/app/assets/javascripts/cookieMessage.js#L19

Cookies are deleted by setting the data to one
that has expired. Because of the hour difference
the date set to make the cookies expire didn't
work.

This fixes that by making the clearing up code use
GMT.
2020-04-08 08:51:53 +01:00

3.8 KiB