mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
FIX: Text logo does not show up on non ember pages.
This commit is contained in:
parent
a827e2afe3
commit
f89a32e759
@ -281,7 +281,13 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def application_logo_url
|
||||
@application_logo_url ||= (mobile_view? && SiteSetting.site_mobile_logo_url).presence || SiteSetting.site_logo_url
|
||||
@application_logo_url ||= begin
|
||||
if mobile_view? && SiteSetting.site_mobile_logo_url
|
||||
SiteSetting.site_mobile_logo_url
|
||||
else
|
||||
SiteSetting.site_home_logo_url
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def login_path
|
||||
|
37
spec/requests/exceptions_controller_spec.rb
Normal file
37
spec/requests/exceptions_controller_spec.rb
Normal file
@ -0,0 +1,37 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ExceptionsController do
|
||||
describe "#not_found" do
|
||||
it "should return the right response" do
|
||||
get "/404"
|
||||
|
||||
expect(response.status).to eq(404)
|
||||
|
||||
expect(response.body).to have_tag(
|
||||
"img",
|
||||
with: {
|
||||
src: SiteSetting.site_home_logo_url
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
describe "text site logo" do
|
||||
let(:title) { "some awesome title" }
|
||||
|
||||
before do
|
||||
SiteSetting.title = title
|
||||
end
|
||||
|
||||
it "should return the right response" do
|
||||
get "/404"
|
||||
|
||||
expect(response.status).to eq(404)
|
||||
|
||||
expect(response.body).to have_tag(
|
||||
"h2",
|
||||
text: title
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user