* Add email_header_and_footer_enabled flag to appearances table
* Set email_header_and_footer_enabled default value to false
* Add checkbox to appearance to toggle show header and footer in emails
* Add email_header_and_footer_enabled to allowed params in controller
* Add header and footer messages to the html and text email layouts
* Remove the color styling for emails header and footer
* Add empty_mailer layout for emails without layout,
to have the header and footer applied
This shared example was only used by this spec so having it in a
separate file provided no benefit, at the cost of clarity. This also
reduces the three `it` blocks into a single test with
`aggregate_failures`.
This would fix long standing failures running tests on
my development machine, which set `Gitlab.config.gitlab.host`
to another host because it's not my local computer. Now I
finally cannot withstand it and decided to fix them once and
for all.
Related to #2235.
This is done by:
1. Delaying the notification sending after the SSH key is commited in DB
2. Gracefully exit the mailer method if the record cannot be found