Skip to content

Commit

Permalink
add impl of subsite_layout to Iiif::AccessController and spec render
Browse files Browse the repository at this point in the history
DLC-1177
  • Loading branch information
barmintor committed Jan 16, 2025
1 parent f1ccbec commit a29f3c6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/iiif/access_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ def login
format.html { render action: 'login', layout: 'minimal' }
end
end

def subsite_layout
Site::LAYOUT_GALLERY
end
end
21 changes: 21 additions & 0 deletions spec/features/iiif/access_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require 'rails_helper'

describe Iiif::AccessController, type: :feature do
describe "login" do
let(:authorized_user) { FactoryBot.create(:user, is_admin: true) }

before do
Warden.test_mode!
login_as authorized_user, scope: :user
visit "/iiif/3/login"
end

after do
Warden.test_reset!
end

it "shows the success message" do
expect(page).to have_text('Authentication successful!')
end
end
end

0 comments on commit a29f3c6

Please sign in to comment.