Skip to content

Commit

Permalink
Fixes the z-index for the "Curated features" dropdown links within the
Browse files Browse the repository at this point in the history
masthead; Increasing the test coverage for ApplicationHelper
  • Loading branch information
jrgriffiniii committed Feb 14, 2019
1 parent 8bac04c commit a89efc3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ body {

.masthead {
margin-bottom: 0px;
/* override from upstream; this was prevening user dropdown from showing up */
z-index: 0;
z-index: 1;
}

#main-content {
Expand Down
21 changes: 21 additions & 0 deletions spec/helpers/application_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,25 @@
expect(output).to eq(data: data)
end
end

describe '#header_title' do
let(:current_site) { instance_double(Spotlight::Site) }

before do
allow(helper).to receive(:current_site).and_return(current_site)
end
it 'delegates to the site title attribute for the Spotlight::Site' do
allow(current_site).to receive(:title).and_return('Test Site Title')

expect(helper.header_title).to eq 'Test Site Title'
end
context 'when the Spotlight::Site title cannot be retrieved' do
before do
allow(current_site).to receive(:title).and_return(nil)
end
it 'accesses the Blacklight application name' do
expect(helper.header_title).to eq 'Test Site Title'
end
end
end
end

0 comments on commit a89efc3

Please sign in to comment.