spec/models/landable/page_spec.rb in landable-1.11.0 vs spec/models/landable/page_spec.rb in landable-1.11.1

- old
+ new

@@ -5,9 +5,12 @@ it { should be_a HasAssets } it { should_not have_valid(:status_code).when(nil,'') } it { should have_valid(:status_code).when(200, 301, 302, 410) } it { should_not have_valid(:status_code).when(201, 303, 405, 500, 404) } + it { should have_valid(:page_name).when(nil, 'Hello', 'adssad', '212131') } + it { should_not have_valid(:page_name).when("#{'hello' * 100}") } + # config.reserved_paths = %w(/reserved_path_set_in_initializer /reject/.* /admin.*) context 'PathValidator' do it { should_not have_valid(:path).when(nil, '', '/reserved_path_set_in_initializer') } it { should_not have_valid(:path).when('/reject/this', '/admin', '/ADMIN', '/admin_something' '/admin/path') } it { should have_valid(:path).when('/reserved_path_set_in_initializer_not', '/do/not/reject/path', '/', '/rejectwhatever', '/reject') }