Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point email footer links to correct sites #1247

Merged
merged 1 commit into from
Mar 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/services/marketing_site.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
class MarketingSite
BASE_URL = URI('https://login.gov').freeze

def self.base_url
BASE_URL.to_s
end

def self.privacy_url
URI.join(BASE_URL, '/policy').to_s
end
Expand Down
6 changes: 4 additions & 2 deletions app/views/layouts/user_mailer.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ html xmlns="http://www.w3.org/1999/xhtml"
tr
th
p.text-center
a href="#" = t('mailer.about', app: APP_NAME)
= link_to(t('mailer.about', app: APP_NAME),
MarketingSite.base_url)
'   |  
a href="#" = t('mailer.privacy_policy')
= link_to(t('mailer.privacy_policy'),
MarketingSite.privacy_url)
th.expander
/! prevent Gmail on iOS font size manipulation
div style="display:none; white-space:nowrap; font:15px courier; line-height:0;"
Expand Down
6 changes: 6 additions & 0 deletions spec/services/marketing_site_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
require 'rails_helper'

RSpec.describe MarketingSite do
describe '.base_url' do
it 'points to the base URL' do
expect(MarketingSite.base_url).to eq('https://login.gov')
end
end

describe '.privacy_url' do
it 'points to the privacy page' do
expect(MarketingSite.privacy_url).to eq('https://login.gov/policy')
Expand Down
8 changes: 4 additions & 4 deletions spec/views/layouts/user_mailer.html.slim_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
expect(rendered).to have_link(MarketingSite.contact_url, href: MarketingSite.contact_url)
end

it 'includes placeholder link to About login.gov' do
expect(rendered).to have_link("About #{APP_NAME}", href: '#')
it 'includes link to About login.gov' do
expect(rendered).to have_link(t('mailer.about', app: APP_NAME), href: MarketingSite.base_url)
end

it 'includes placeholder link to the privacy policy' do
expect(rendered).to have_link('Privacy policy', href: '#')
it 'includes link to the privacy policy' do
expect(rendered).to have_link(t('mailer.privacy_policy'), href: MarketingSite.privacy_url)
end
end