Commit b05c01e908e7606cc5d5303c8d755f2493fce7ea

Authored by AntonioTerceiro
1 parent 803c9d4c

ActionItem96: removing .localdomain from default hostname



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@689 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/models/environment.rb
... ... @@ -151,7 +151,7 @@ class Environment < ActiveRecord::Base
151 151  
152 152 def default_hostname
153 153 if self.domains(true).empty?
154   - 'localhost.localdomain'
  154 + 'localhost'
155 155 else
156 156 self.domains.find(:first, :order => 'id').name
157 157 end
... ...
test/unit/environment_test.rb
... ... @@ -151,9 +151,9 @@ class EnvironmentTest < Test::Unit::TestCase
151 151 assert_equal 'example.com', env.default_hostname
152 152 end
153 153  
154   - should 'default to localhost.localdomain as hostname' do
  154 + should 'default to localhost as hostname' do
155 155 env = Environment.create!(:name => 'test environment')
156   - assert_equal 'localhost.localdomain', env.default_hostname
  156 + assert_equal 'localhost', env.default_hostname
157 157 end
158 158  
159 159 should 'provide an approval_method setting' do
... ...