Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/controllers/litestream/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module Litestream
class ApplicationController < Litestream.base_controller_class.constantize
layout "litestream/application"

protect_from_forgery with: :exception

if Litestream.password
Expand Down
1 change: 1 addition & 0 deletions test/controllers/test_processes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Litestream::TestProcessesController < ActionDispatch::IntegrationTest
Litestream.stub :databases, stubbed_databases do
get litestream.process_url
assert_response :success
assert_select "title", "Litestream"

assert_select "#process_12345", 1 do
assert_select "small", "sleeping"
Expand Down
1 change: 1 addition & 0 deletions test/dummy/app/controllers/my_application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
class MyApplicationController < ApplicationController
layout "application"
end
4 changes: 4 additions & 0 deletions test/litestream/test_base_application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ class Litestream::BaseApplicationControllerTest < ActiveSupport::TestCase
test "engine's ApplicationController inherits from configured base_controller_class" do
assert Litestream::ApplicationController < MyApplicationController
end

test "engine's ApplicationController uses its own layout regardless of base controller layout" do
assert_equal "litestream/application", Litestream::ApplicationController._layout
end
end
Loading