DEV: Fix web manifest short_title tests

This commit is contained in:
Rafael dos Santos Silva 2020-02-04 14:46:33 -03:00
parent 5ead60677a
commit f88fa99b0b
No known key found for this signature in database
GPG Key ID: 5E50360227B34938

View File

@ -70,10 +70,13 @@ RSpec.describe MetadataController do
end
it 'uses the short_title if it is set' do
title = 'FooBarBaz Forum'
SiteSetting.title = title
get "/manifest.webmanifest"
expect(response.status).to eq(200)
manifest = JSON.parse(response.body)
expect(manifest).to_not have_key("short_name")
expect(manifest["short_name"]).to eq("FooBarBaz")
SiteSetting.short_title = "foo"