瀏覽代碼

Fix flashes partial render error for controllers which don't inherit from application controller (#2400)

* Add failing spec for oauth/authorized_applications controller

* Use explicit reference to flashes partial from admin layout

Because some of the controllers which use the admin layout do not inherit from
application controller, this partial is not in their view path.
master
Matt Jankowski 7 年之前
committed by Eugen
父節點
當前提交
092fdc89fa
共有 2 個檔案被更改,包括 22 行新增1 行删除
  1. +1
    -1
      app/views/layouts/admin.html.haml
  2. +21
    -0
      spec/controllers/oauth/authorized_applications_controller_spec.rb

+ 1
- 1
app/views/layouts/admin.html.haml 查看文件

@@ -13,7 +13,7 @@
.content
%h2= yield :page_title

= render 'flashes'
= render 'application/flashes'

= yield



+ 21
- 0
spec/controllers/oauth/authorized_applications_controller_spec.rb 查看文件

@@ -0,0 +1,21 @@
# frozen_string_literal: true

require 'rails_helper'

describe Oauth::AuthorizedApplicationsController do
render_views

before do
sign_in Fabricate(:user), scope: :user
end

describe 'GET #index' do
before do
get :index
end

it 'returns http success' do
expect(response).to have_http_status(:success)
end
end
end

Loading…
取消
儲存