Commit bee6e16e9746f1275b97f5d77bfb316afcf178cc
1 parent
bdf53d0e
Exists in
master
and in
22 other branches
ActionItem68: s/virtual_communities/environments/
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@514 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
17 changed files
with
35 additions
and
35 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,15 @@ |
| 1 | +class CreateEnvironments < ActiveRecord::Migration | |
| 2 | + def self.up | |
| 3 | + create_table :environments do |t| | |
| 4 | + t.column :name, :string | |
| 5 | + t.column :is_default, :boolean | |
| 6 | + t.column :settings, :text | |
| 7 | + t.column :design_data, :text | |
| 8 | + end | |
| 9 | + Environment.create!(:name => 'Default Environment', :is_default => true) | |
| 10 | + end | |
| 11 | + | |
| 12 | + def self.down | |
| 13 | + drop_table :environments | |
| 14 | + end | |
| 15 | +end | ... | ... |
db/migrate/002_create_virtual_communities.rb
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -class CreateEnvironments < ActiveRecord::Migration | |
| 2 | - def self.up | |
| 3 | - create_table :environments do |t| | |
| 4 | - t.column :name, :string | |
| 5 | - t.column :is_default, :boolean | |
| 6 | - t.column :settings, :text | |
| 7 | - t.column :design_data, :text | |
| 8 | - end | |
| 9 | - Environment.create!(:name => 'Default Environment', :is_default => true) | |
| 10 | - end | |
| 11 | - | |
| 12 | - def self.down | |
| 13 | - drop_table :virtual_communities | |
| 14 | - end | |
| 15 | -end |
test/functional/admin_panel_controller_test.rb
test/functional/application_controller_test.rb
| ... | ... | @@ -6,7 +6,7 @@ class TestController; def rescue_action(e) raise e end; end |
| 6 | 6 | |
| 7 | 7 | class ApplicationControllerTest < Test::Unit::TestCase |
| 8 | 8 | |
| 9 | - fixtures :profiles, :virtual_communities, :domains, :design_boxes | |
| 9 | + fixtures :profiles, :environments, :domains, :design_boxes | |
| 10 | 10 | |
| 11 | 11 | def setup |
| 12 | 12 | @controller = TestController.new | ... | ... |
test/functional/content_viewer_controller_test.rb
| ... | ... | @@ -6,7 +6,7 @@ class ContentViewerController; def rescue_action(e) raise e end; end |
| 6 | 6 | |
| 7 | 7 | class ContentViewerControllerTest < Test::Unit::TestCase |
| 8 | 8 | |
| 9 | - fixtures :domains, :virtual_communities, :users, :profiles, :comatose_pages | |
| 9 | + fixtures :domains, :environments, :users, :profiles, :comatose_pages | |
| 10 | 10 | |
| 11 | 11 | def setup |
| 12 | 12 | @controller = ContentViewerController.new | ... | ... |
test/functional/features_controller_test.rb
| ... | ... | @@ -6,7 +6,7 @@ class FeaturesController; def rescue_action(e) raise e end; end |
| 6 | 6 | |
| 7 | 7 | class FeaturesControllerTest < Test::Unit::TestCase |
| 8 | 8 | |
| 9 | - fixtures :virtual_communities, :domains | |
| 9 | + fixtures :environments, :domains | |
| 10 | 10 | |
| 11 | 11 | def setup |
| 12 | 12 | @controller = FeaturesController.new |
| ... | ... | @@ -28,7 +28,7 @@ class FeaturesControllerTest < Test::Unit::TestCase |
| 28 | 28 | post :update, :features => { 'feature1' => '1', 'feature2' => '1' } |
| 29 | 29 | assert_redirected_to :action => 'index' |
| 30 | 30 | assert_kind_of String, flash[:notice] |
| 31 | - v = Environment.find(virtual_communities(:anhetegua_net).id) | |
| 31 | + v = Environment.find(environments(:anhetegua_net).id) | |
| 32 | 32 | assert v.enabled?('feature2') |
| 33 | 33 | assert v.enabled?('feature2') |
| 34 | 34 | assert !v.enabled?('feature3') |
| ... | ... | @@ -39,7 +39,7 @@ class FeaturesControllerTest < Test::Unit::TestCase |
| 39 | 39 | post :update # no features |
| 40 | 40 | assert_redirected_to :action => 'index' |
| 41 | 41 | assert_kind_of String, flash[:notice] |
| 42 | - v = Environment.find(virtual_communities(:anhetegua_net).id) | |
| 42 | + v = Environment.find(environments(:anhetegua_net).id) | |
| 43 | 43 | assert !v.enabled?('feature1') |
| 44 | 44 | assert !v.enabled?('feature2') |
| 45 | 45 | assert !v.enabled?('feature3') | ... | ... |
test/functional/home_controller_test.rb
| ... | ... | @@ -6,7 +6,7 @@ class HomeController; def rescue_action(e) raise e end; end |
| 6 | 6 | |
| 7 | 7 | class HomeControllerTest < Test::Unit::TestCase |
| 8 | 8 | |
| 9 | - fixtures :profiles, :virtual_communities, :domains | |
| 9 | + fixtures :profiles, :environments, :domains | |
| 10 | 10 | |
| 11 | 11 | def setup |
| 12 | 12 | @controller = HomeController.new | ... | ... |
test/integration/editing_person_info_test.rb
| ... | ... | @@ -2,7 +2,7 @@ require "#{File.dirname(__FILE__)}/../test_helper" |
| 2 | 2 | |
| 3 | 3 | class EditingPersonInfoTest < ActionController::IntegrationTest |
| 4 | 4 | |
| 5 | - fixtures :users, :profiles, :comatose_pages, :domains, :virtual_communities, :person_infos | |
| 5 | + fixtures :users, :profiles, :comatose_pages, :domains, :environments, :person_infos | |
| 6 | 6 | |
| 7 | 7 | should 'allow to edit person info' do |
| 8 | 8 | ... | ... |
test/integration/enable_disable_features_test.rb
| 1 | 1 | require "#{File.dirname(__FILE__)}/../test_helper" |
| 2 | 2 | |
| 3 | 3 | class EnableDisableFeaturesTest < ActionController::IntegrationTest |
| 4 | - fixtures :domains, :virtual_communities, :users, :profiles | |
| 4 | + fixtures :domains, :environments, :users, :profiles | |
| 5 | 5 | |
| 6 | 6 | def test_enable_features |
| 7 | 7 | uses_host 'anhetegua.net' | ... | ... |
test/integration/login_to_the_application_test.rb
| 1 | 1 | require "#{File.dirname(__FILE__)}/../test_helper" |
| 2 | 2 | |
| 3 | 3 | class LoginToTheApplicationTest < ActionController::IntegrationTest |
| 4 | - fixtures :users, :virtual_communities, :profiles | |
| 4 | + fixtures :users, :environments, :profiles | |
| 5 | 5 | |
| 6 | 6 | def test_anonymous_user_logins_to_application |
| 7 | 7 | get '/' | ... | ... |
test/integration/manage_documents_test.rb
| ... | ... | @@ -2,7 +2,7 @@ require "#{File.dirname(__FILE__)}/../test_helper" |
| 2 | 2 | |
| 3 | 3 | class ManageDocumentsTest < ActionController::IntegrationTest |
| 4 | 4 | |
| 5 | - fixtures :users, :profiles, :comatose_pages, :domains, :virtual_communities | |
| 5 | + fixtures :users, :profiles, :comatose_pages, :domains, :environments | |
| 6 | 6 | |
| 7 | 7 | def test_creation_of_a_new_article |
| 8 | 8 | count = Article.count | ... | ... |
test/integration/signup_test.rb
| 1 | 1 | require "#{File.dirname(__FILE__)}/../test_helper" |
| 2 | 2 | |
| 3 | 3 | class AccountTest < ActionController::IntegrationTest |
| 4 | - fixtures :users, :profiles, :domains, :virtual_communities | |
| 4 | + fixtures :users, :profiles, :domains, :environments | |
| 5 | 5 | |
| 6 | 6 | def test_should_require_acceptance_of_terms_for_signup |
| 7 | 7 | Environment.default.update_attributes(:terms_of_use => 'You agree that from now on your soul belongs to us.') | ... | ... |
test/integration/user_registers_at_the_application_test.rb
| 1 | 1 | require "#{File.dirname(__FILE__)}/../test_helper" |
| 2 | 2 | |
| 3 | 3 | class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest |
| 4 | - fixtures :users, :virtual_communities, :profiles | |
| 4 | + fixtures :users, :environments, :profiles | |
| 5 | 5 | |
| 6 | 6 | # Replace this with your real tests. |
| 7 | 7 | def test_successfull_registration | ... | ... |
test/unit/domain_test.rb
test/unit/enterprise_test.rb
| 1 | 1 | require File.dirname(__FILE__) + '/../test_helper' |
| 2 | 2 | |
| 3 | 3 | class EnterpriseTest < Test::Unit::TestCase |
| 4 | - fixtures :profiles, :virtual_communities, :users, :comatose_pages | |
| 4 | + fixtures :profiles, :environments, :users, :comatose_pages | |
| 5 | 5 | |
| 6 | 6 | def test_identifier_validation |
| 7 | 7 | p = Enterprise.new | ... | ... |
test/unit/environment_test.rb
| 1 | 1 | require File.dirname(__FILE__) + '/../test_helper' |
| 2 | 2 | |
| 3 | 3 | class EnvironmentTest < Test::Unit::TestCase |
| 4 | - fixtures :virtual_communities | |
| 4 | + fixtures :environments | |
| 5 | 5 | |
| 6 | 6 | def test_exists_default_and_it_is_unique |
| 7 | 7 | Environment.delete_all |
| ... | ... | @@ -34,7 +34,7 @@ class EnvironmentTest < Test::Unit::TestCase |
| 34 | 34 | end |
| 35 | 35 | |
| 36 | 36 | def test_features |
| 37 | - v = virtual_communities(:colivre_net) | |
| 37 | + v = environments(:colivre_net) | |
| 38 | 38 | v.enable('feature1') |
| 39 | 39 | assert v.enabled?('feature1') |
| 40 | 40 | v.disable('feature1') |
| ... | ... | @@ -42,13 +42,13 @@ class EnvironmentTest < Test::Unit::TestCase |
| 42 | 42 | end |
| 43 | 43 | |
| 44 | 44 | def test_enabled_features |
| 45 | - v = virtual_communities(:colivre_net) | |
| 45 | + v = environments(:colivre_net) | |
| 46 | 46 | v.enabled_features = [ 'feature1', 'feature2' ] |
| 47 | 47 | assert v.enabled?('feature1') && v.enabled?('feature2') && !v.enabled?('feature3') |
| 48 | 48 | end |
| 49 | 49 | |
| 50 | 50 | def test_enabled_features_no_features_enabled |
| 51 | - v = virtual_communities(:colivre_net) | |
| 51 | + v = environments(:colivre_net) | |
| 52 | 52 | v.enabled_features = nil |
| 53 | 53 | assert !v.enabled?('feature1') && !v.enabled?('feature2') && !v.enabled?('feature3') |
| 54 | 54 | end | ... | ... |
test/unit/profile_test.rb
| 1 | 1 | require File.dirname(__FILE__) + '/../test_helper' |
| 2 | 2 | |
| 3 | 3 | class ProfileTest < Test::Unit::TestCase |
| 4 | - fixtures :profiles, :virtual_communities, :users, :comatose_pages | |
| 4 | + fixtures :profiles, :environments, :users, :comatose_pages | |
| 5 | 5 | |
| 6 | 6 | def test_identifier_validation |
| 7 | 7 | p = Profile.new | ... | ... |