From 433bcf9b0439771b1e2661a62fec115e44922232 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 31 Jan 2019 12:28:31 +0100 Subject: Add local markdown version Cached markdown version is composed both from global and local markdown version. This allows admins to bump version locally when needed (e.g. when external URL is changed). --- spec/models/application_setting_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/models/application_setting_spec.rb') diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index 96aa9a82b71..789e14e8a20 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -70,6 +70,13 @@ describe ApplicationSetting do .is_greater_than(0) end + it do + is_expected.to validate_numericality_of(:local_markdown_version) + .only_integer + .is_greater_than_or_equal_to(0) + .is_less_than(65536) + end + context 'key restrictions' do it 'supports all key types' do expect(described_class::SUPPORTED_KEY_TYPES).to contain_exactly(:rsa, :dsa, :ecdsa, :ed25519) -- cgit v1.2.1