diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 9a404d4..50c4dcb 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -30,7 +30,7 @@ class AccountController < ApplicationController return unless request.post? @user.save! self.current_user = @user - redirect_back_or_default(:controller => '/account', :action => 'index') + redirect_back_or_default(:controller => 'account', :action => 'index') flash[:notice] = _("Thanks for signing up!") rescue ActiveRecord::RecordInvalid render :action => 'signup' diff --git a/app/controllers/application.rb b/app/controllers/application.rb index f76c4fe..7a25154 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -12,13 +12,6 @@ class ApplicationController < ActionController::Base before_filter :detect_stuff_by_domain attr_reader :virtual_community - before_filter :load_owner - # Load the owner - def load_owner - # TODO: this should not be hardcoded - @owner = Profile.find(1) if Profile.exists?(1) - end - protected # TODO: move this logic somewhere else (Domain class?) diff --git a/app/models/enterprise.rb b/app/models/enterprise.rb index 25f0875..c5fdabb 100644 --- a/app/models/enterprise.rb +++ b/app/models/enterprise.rb @@ -1,4 +1,4 @@ #An enterprise is a kind of organization. According to the system concept, only enterprises can offer products/services and ahave to be validated by an validation entity class Enterprise < Organization - belongs_to :validation_entity, :class_name => 'organization' + belongs_to :validation_entity, :class_name => 'organization', :foreign_key => 'validation_entity_id' end diff --git a/test/fixtures/organizations.yml b/test/fixtures/organizations.yml deleted file mode 100644 index b49c4eb..0000000 --- a/test/fixtures/organizations.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html -one: - id: 1 -two: - id: 2 diff --git a/test/functional/application_controller_test.rb b/test/functional/application_controller_test.rb index d5e2e76..680b45b 100644 --- a/test/functional/application_controller_test.rb +++ b/test/functional/application_controller_test.rb @@ -29,11 +29,6 @@ class ApplicationControllerTest < Test::Unit::TestCase assert_tag :tag => 'span', :content => 'post_only' end - def test_exist_owner - get :index - assert_not_nil assigns(:owner) - end - def test_should_generate_help_box_when_passing_string get :help_with_string assert_tag({ diff --git a/test/functional/features_controller_test.rb b/test/functional/features_controller_test.rb index 700f462..7c14984 100644 --- a/test/functional/features_controller_test.rb +++ b/test/functional/features_controller_test.rb @@ -6,7 +6,7 @@ class FeaturesController; def rescue_action(e) raise e end; end class FeaturesControllerTest < Test::Unit::TestCase - fixtures :virtual_communities + fixtures :virtual_communities, :domains def setup @controller = FeaturesController.new diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index b3021d0..0fe14cd 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -25,7 +25,7 @@ class RoutingTest < ActionController::IntegrationTest #FIXME: assert_routing cannot find controllers in plugins' flunk 'FIXME: assert_routing cannot find controllers in plugins' require File.join(RAILS_ROOT, 'vendor', 'plugins', 'comatose', 'lib', 'comatose', 'admin_controller') - assert_routing('/cms/ze', :controller => 'comatose::admin') + assert_routing('/cms/ze', :controller => 'comatose_admin') end def test_edit_template diff --git a/test/unit/organization_test.rb b/test/unit/organization_test.rb index a728ec8..d05c0a7 100644 --- a/test/unit/organization_test.rb +++ b/test/unit/organization_test.rb @@ -1,10 +1,10 @@ require File.dirname(__FILE__) + '/../test_helper' class OrganizationTest < Test::Unit::TestCase - fixtures :organizations + fixtures :profiles - # Replace this with your real tests. + # FIXME: add actual organization tests here def test_truth - assert true + assert_not_nil Organization.new end end -- libgit2 0.21.2