From d0737aa108ae0494cf2a6926ed2655dadc00f4a8 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Wed, 1 Aug 2007 15:20:49 +0000 Subject: [PATCH] ActionItem8: trying to make all tests pass --- app/models/link_block.rb | 2 +- test/functional/manage_tags_controller_test.rb | 2 +- test/integration/manage_tags_test.rb | 2 +- test/mocks/test/test_controller.rb | 2 -- test/unit/block_test.rb | 62 -------------------------------------------------------------- test/unit/box_test.rb | 64 ---------------------------------------------------------------- 6 files changed, 3 insertions(+), 131 deletions(-) delete mode 100644 test/unit/block_test.rb delete mode 100644 test/unit/box_test.rb diff --git a/app/models/link_block.rb b/app/models/link_block.rb index cca0c6a..96ed9a7 100644 --- a/app/models/link_block.rb +++ b/app/models/link_block.rb @@ -1,4 +1,4 @@ -class LinkBlock < Block +class LinkBlock < Design::Block def content Profile.find(:all).map{|p| p.name} diff --git a/test/functional/manage_tags_controller_test.rb b/test/functional/manage_tags_controller_test.rb index 3c9d53e..17cdb7b 100644 --- a/test/functional/manage_tags_controller_test.rb +++ b/test/functional/manage_tags_controller_test.rb @@ -6,7 +6,7 @@ class ManageTagsController; def rescue_action(e) raise e end; end class ManageTagsControllerTest < Test::Unit::TestCase - fixtures :profiles, :boxes, :blocks, :domains + fixtures :profiles, :design_boxes, :design_blocks, :domains def setup @controller = ManageTagsController.new diff --git a/test/integration/manage_tags_test.rb b/test/integration/manage_tags_test.rb index cea6371..62f4db6 100644 --- a/test/integration/manage_tags_test.rb +++ b/test/integration/manage_tags_test.rb @@ -1,7 +1,7 @@ require "#{File.dirname(__FILE__)}/../test_helper" class ManageTagsTest < ActionController::IntegrationTest - fixtures :tags, :profiles, :boxes, :blocks + fixtures :tags, :profiles, :design_boxes, :design_blocks def test_tags_create_edit_destroy get '/admin/manage_tags' diff --git a/test/mocks/test/test_controller.rb b/test/mocks/test/test_controller.rb index 9d7138e..09e3e3b 100644 --- a/test/mocks/test/test_controller.rb +++ b/test/mocks/test/test_controller.rb @@ -1,7 +1,5 @@ class TestController < ApplicationController - uses_flexible_template :owner => 'owner' - def index render :text => 'index' end diff --git a/test/unit/block_test.rb b/test/unit/block_test.rb deleted file mode 100644 index aa56bb6..0000000 --- a/test/unit/block_test.rb +++ /dev/null @@ -1,62 +0,0 @@ -require File.dirname(__FILE__) + '/../test_helper' - -class BlockTest < Test::Unit::TestCase - fixtures :design_blocks, :profiles - - def setup - @profile = Profile.find(1) - end - - def test_setup_assumptions - assert @profile.valid? - end -#TODO remove it this tests are now on design plugin -# # Replace this with your real tests. -# def test_create -# count = Block.count -# b = Block.new -# assert !b.valid? -# assert b.errors.invalid?(:box_id) -# assert b.errors.invalid?(:position) -# -# box = Box.new -# box.owner = @profile -# box.number = 1000 -# assert box.save -# b.box = box -# assert !b.valid? -# assert b.errors.invalid?(:position) -# -# b.position=1 -# assert b.save -# -# assert_equal count + 1, Block.count -# end -# -# def test_box_presence -# b = Block.new -# b.position = 1000 -# assert !b.valid? -# assert b.errors.invalid?(:box_id) -# -# box = Box.new -# box.owner = @profile -# box.number = 1000 -# assert box.save -# b.box = box -# assert b.valid? -# -# end -# -# def test_destroy -# b = Block.find(1) -# assert b.destroy -# end -# -# def test_valid_fixtures -# Block.find(:all).each do |b| -# assert b.valid? -# end -# end - -end diff --git a/test/unit/box_test.rb b/test/unit/box_test.rb deleted file mode 100644 index 2fe3180..0000000 --- a/test/unit/box_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -require File.dirname(__FILE__) + '/../test_helper' - -class BoxTest < Test::Unit::TestCase - fixtures :design_boxes, :design_blocks, :profiles - - def setup - @owner = Profile.find(1) - end - - def test_setup - assert @owner.valid? - end -#TODO remove this file these tests are now on desgin plugin -# def test_destroy -# count = Box.count -# assert Box.find(1).destroy -# assert_equal count - 1, Box.count -# end -# -# def test_create -# count = Box.count -# b = Box.new -# b.owner = @owner -# assert b.save -# assert count + 1, Box.count -# end -# -# -# def test_number_format -# b = Box.new -# b.number = "none" -# assert !b.valid? -# assert b.errors.invalid?(:number) -# -# b = Box.new -# b.number = 10.2 -# assert !b.save -# -# b = Box.new -# b.owner = @owner -# assert b.save -# -# end -# -# def test_unique_number -# assert Box.delete_all -# b = Box.new -# b.owner = @owner -# assert b.save -# -# b = Box.new -# b.owner = @owner -# b.number = 1 -# assert !b.valid? -# assert b.errors.invalid?(:number) -# end -# -# def test_presence_number -# b = Box.new(:number => nil) -# assert !b.valid? -# assert b.errors.invalid?(:number) -# end - -end -- libgit2 0.21.2