Skip to content

Commit

Permalink
Admins skip library selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Laddusaw committed Aug 12, 2024
1 parent 76011a5 commit 3d0a1f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/views/locker_applications/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<% content_for :title do %>
Locker application
<% end %>
<% if Flipflop.lewis_patrons? %>
<%= render 'building_select_form', locker_application: @locker_application %>
<% else %>
<% if current_user.admin? || !Flipflop.lewis_patrons? %>
<%= render 'form', locker_application: @locker_application %>
<% else %>
<%= render 'building_select_form', locker_application: @locker_application %>
<% end %>
2 changes: 0 additions & 2 deletions spec/features/locker_application_new_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@

it 'can assign the application to an existing user' do
visit root_path
select('Firestone Library', from: :locker_application_building_id)
click_button('Next')
new_application = LockerApplication.last
expect(new_application.user).to eq(admin)
expect(page).to have_content('Firestone Library Locker Application')
Expand Down

0 comments on commit 3d0a1f2

Please sign in to comment.