FEATURE: custom setting for large square site icon

This icon is used for android splash screen
This commit is contained in:
Sam
2017-11-03 16:19:31 +11:00
parent 3c8a48f768
commit 56412adad5
5 changed files with 13 additions and 4 deletions

View File

@ -3,11 +3,17 @@ require 'rails_helper'
RSpec.describe MetadataController do
describe 'manifest.json' do
it 'returns the right output' do
title = 'MyApp'
SiteSetting.title = title
SiteSetting.large_icon_url = "http://big.square/png"
get :manifest
expect(response.body).to include(title)
expect(response.content_type).to eq('application/json')
manifest = JSON.parse(response.body)
expect(manifest["name"]).to eq(title)
expect(manifest["icons"].first["src"]).to eq("http://big.square/png")
end
end