-
<% if logged_in? %>
- Currently logged in as, <%= user_name.titlecase %> <%= session_switcher %>
+
+
+ <%= user_name.titlecase %>
+
+ <%= session_switcher %>
<% else %>
- Not logged in
+ Not logged in
<% end %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 665cd180c..d7eff1795 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -21,11 +21,12 @@
<% end %>
-
+
+
-
+
<%= render 'header' %>
<%= render partial: 'flash_messages' %>
diff --git a/public/apple-touch-icon-development.png b/public/apple-touch-icon-development.png
new file mode 100644
index 000000000..cb7ba6536
Binary files /dev/null and b/public/apple-touch-icon-development.png differ
diff --git a/public/apple-touch-icon-staging.png b/public/apple-touch-icon-staging.png
new file mode 100644
index 000000000..482d58cb0
Binary files /dev/null and b/public/apple-touch-icon-staging.png differ
diff --git a/public/apple-touch-icon-training.png b/public/apple-touch-icon-training.png
new file mode 100644
index 000000000..5ba98fd52
Binary files /dev/null and b/public/apple-touch-icon-training.png differ
diff --git a/public/favicon-development.ico b/public/favicon-development.ico
new file mode 100644
index 000000000..5dacd7248
Binary files /dev/null and b/public/favicon-development.ico differ
diff --git a/public/favicon-staging.ico b/public/favicon-staging.ico
new file mode 100644
index 000000000..6b097e9a1
Binary files /dev/null and b/public/favicon-staging.ico differ
diff --git a/public/favicon-training.ico b/public/favicon-training.ico
new file mode 100644
index 000000000..e18613323
Binary files /dev/null and b/public/favicon-training.ico differ
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
new file mode 100644
index 000000000..4b6658db1
--- /dev/null
+++ b/spec/helpers/application_helper_spec.rb
@@ -0,0 +1,63 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe ApplicationHelper do
+ describe '#favicon' do
+ subject(:favicon) { helper.favicon }
+
+ it 'returns the favicon path for the production environment' do
+ allow(Rails).to receive(:env).and_return('production')
+ expect(favicon).to eq('favicon.ico')
+ end
+
+ it 'returns the favicon path for the training environment' do
+ allow(Rails).to receive(:env).and_return('training')
+ expect(favicon).to eq('favicon-training.ico')
+ end
+
+ it 'returns the favicon path for the staging environment' do
+ allow(Rails).to receive(:env).and_return('staging')
+ expect(favicon).to eq('favicon-staging.ico')
+ end
+
+ it 'returns the favicon path for the development environment' do
+ allow(Rails).to receive(:env).and_return('development')
+ expect(favicon).to eq('favicon-development.ico')
+ end
+
+ it 'returns the favicon path for an unknown environment' do
+ allow(Rails).to receive(:env).and_return('unknown')
+ expect(favicon).to eq('favicon-development.ico')
+ end
+ end
+
+ describe '#apple_touch_icon' do
+ subject(:apple_touch_icon) { helper.apple_touch_icon }
+
+ it 'returns the apple-touch-icon path for the production environment' do
+ allow(Rails).to receive(:env).and_return('production')
+ expect(apple_touch_icon).to eq('apple-touch-icon.png')
+ end
+
+ it 'returns the apple-touch-icon path for the training environment' do
+ allow(Rails).to receive(:env).and_return('training')
+ expect(apple_touch_icon).to eq('apple-touch-icon-training.png')
+ end
+
+ it 'returns the apple-touch-icon path for the staging environment' do
+ allow(Rails).to receive(:env).and_return('staging')
+ expect(apple_touch_icon).to eq('apple-touch-icon-staging.png')
+ end
+
+ it 'returns the apple-touch-icon path for the development environment' do
+ allow(Rails).to receive(:env).and_return('development')
+ expect(apple_touch_icon).to eq('apple-touch-icon-development.png')
+ end
+
+ it 'returns the apple-touch-icon path for an unknown environment' do
+ allow(Rails).to receive(:env).and_return('unknown')
+ expect(apple_touch_icon).to eq('apple-touch-icon-development.png')
+ end
+ end
+end