Commit 7c86f0109321d27d9c23983fe7ce98695b05730d

Authored by LeandroNunes
1 parent cf5172f0

ActionItem0: loadding the corrects boxes

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@90 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/controllers/application.rb
... ... @@ -44,7 +44,6 @@ class ApplicationController < ActionController::Base
44 44 end
45 45  
46 46 def boxes_by_template(template)
47   - #f = YAML.load_file("#{TEMPLATE_DIR_PATH}/#{template}/#{template}.yml")
48 47 f = YAML.load_file("#{RAILS_ROOT}/public/templates/default/default.yml")
49 48 number_of_boxes = f[template.to_s]["number_of_boxes"]
50 49 raise _("The file #{template}.yml it's not a valid template filename") if number_of_boxes.nil?
... ...
app/controllers/edit_template_controller.rb
... ... @@ -2,4 +2,9 @@ class EditTemplateController < ApplicationController
2 2  
3 3 uses_manage_template :edit => true
4 4  
  5 + def test
  6 + @bli = true
  7 + render :action => 'index'
  8 + end
  9 +
5 10 end
... ...
test/functional/edit_template_controller_test.rb
... ... @@ -13,6 +13,11 @@ class EditTemplateControllerTest < Test::Unit::TestCase
13 13  
14 14 # Replace this with your real tests.
15 15 def test_truth
  16 + get :test
  17 + assert_response :success
  18 + assert_template 'index'
  19 +
16 20 assert true
  21 + assert !assigns(:leo)
17 22 end
18 23 end
... ...
test/mocks/test/virtual_community.rb
1   -require 'app/models/virtual_community'
  1 +require File.expand_path(File.dirname(__FILE__) + "/../../../app/models/virtual_community")
2 2  
3 3 class VirtualCommunity < ActiveRecord::Base
4 4 def self.available_features
... ...