Skip to content

Commit

Permalink
debug: remove me before merging
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Jul 30, 2019
1 parent 717aea5 commit f17daff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app/views/patron/_patron.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@
<dt class="col-4 col-md-2 font-weight-normal">eResource access:</dt>
<dd class="col-8 col-md-10 patron-status">In-library only</dd>
<% end %>

<% if current_user.privgroups %>
<dt class="col-4 col-md-2 font-weight-normal">Privgroups:</dt>
<dd class="col-8 col-md-10 email"><%= current_user.privgroups.inspect %></dd>
<% end %>
</dl>
1 change: 1 addition & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@

# update shared_configs before restarting app
before 'deploy:restart', 'shared_configs:update'
set :branch, 'privgroups'
4 changes: 2 additions & 2 deletions spec/views/patron/_patron.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
**patron_options
)
end
let(:user) { instance_double(User, has_eresources_access?: true) }
let(:user) { instance_double(User, has_eresources_access?: true, privgroups: []) }

before do
controller.singleton_class.class_eval do
Expand Down Expand Up @@ -70,7 +70,7 @@ def current_user; end
end

context 'when the user has no access' do
let(:user) { instance_double(User, has_eresources_access?: false) }
let(:user) { instance_double(User, has_eresources_access?: false, privgroups: []) }

it { expect(rendered).to have_css('dt', text: 'eResource access') }
end
Expand Down
2 changes: 1 addition & 1 deletion spec/views/summaries/index.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
)
end

let(:user) { instance_double(User, has_eresources_access?: true) }
let(:user) { instance_double(User, has_eresources_access?: true, privgroups: []) }

before do
controller.singleton_class.class_eval do
Expand Down

0 comments on commit f17daff

Please sign in to comment.