fix bug #111
This commit is contained in:
parent
0ea5275504
commit
2236b43222
@ -50,7 +50,7 @@ module Locomotive
|
||||
self.manage_subdomain? && self.manage_domains?
|
||||
end
|
||||
|
||||
def reserved_domains
|
||||
def reserved_subdomains
|
||||
if self.multi_sites?
|
||||
if self.multi_sites.reserved_subdomains.blank?
|
||||
@@defaults[:reserved_subdomains]
|
||||
|
19
spec/lib/locomotive/configuration_spec.rb
Normal file
19
spec/lib/locomotive/configuration_spec.rb
Normal file
@ -0,0 +1,19 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Locomotive::Configuration do
|
||||
|
||||
before(:each) do
|
||||
@old_config = Locomotive.config.dup
|
||||
end
|
||||
|
||||
it 'allows a different value for the reserved subdomains' do
|
||||
Locomotive.config.reserved_subdomains.include?('www').should be_true # by default
|
||||
Locomotive.config.multi_sites { |multi_sites| multi_sites.reserved_subdomains = %w(empty) }
|
||||
Locomotive.config.reserved_subdomains.should == ['empty']
|
||||
end
|
||||
|
||||
after(:each) do
|
||||
Locomotive.config = @old_config
|
||||
end
|
||||
|
||||
end
|
@ -5,7 +5,7 @@ describe Locomotive::Export do
|
||||
context '#content_type' do
|
||||
|
||||
before(:each) do
|
||||
site = Factory.build(:site)
|
||||
site = Factory.build('another site')
|
||||
Site.stubs(:find).returns(site)
|
||||
project_type = build_project_type(site)
|
||||
project_type.contents.build(:title => 'Project #1', :description => 'Lorem ipsum', :active => true)
|
||||
|
Loading…
Reference in New Issue
Block a user