diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml index 23e2598..723ea16 100644 --- a/app/views/layouts/application.rhtml +++ b/app/views/layouts/application.rhtml @@ -34,7 +34,7 @@
diff --git a/test/unit/block_test.rb b/test/unit/block_test.rb index 3aeac97..aa56bb6 100644 --- a/test/unit/block_test.rb +++ b/test/unit/block_test.rb @@ -1,7 +1,7 @@ require File.dirname(__FILE__) + '/../test_helper' class BlockTest < Test::Unit::TestCase - fixtures :blocks, :profiles + fixtures :design_blocks, :profiles def setup @profile = Profile.find(1) @@ -10,53 +10,53 @@ class BlockTest < Test::Unit::TestCase def test_setup_assumptions assert @profile.valid? end - - # 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 +#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 index 5f9254c..2fe3180 100644 --- a/test/unit/box_test.rb +++ b/test/unit/box_test.rb @@ -1,7 +1,7 @@ require File.dirname(__FILE__) + '/../test_helper' class BoxTest < Test::Unit::TestCase - fixtures :boxes, :blocks, :profiles + fixtures :design_boxes, :design_blocks, :profiles def setup @owner = Profile.find(1) @@ -10,55 +10,55 @@ class BoxTest < Test::Unit::TestCase def test_setup assert @owner.valid? end - - 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 +#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 diff --git a/test/unit/link_block_test.rb b/test/unit/link_block_test.rb index e5cce36..3e95250 100644 --- a/test/unit/link_block_test.rb +++ b/test/unit/link_block_test.rb @@ -1,7 +1,7 @@ require File.dirname(__FILE__) + '/../test_helper' class LinkBlockTest < Test::Unit::TestCase - fixtures :blocks + fixtures :design_blocks # Replace this with your real tests. def test_content diff --git a/test/unit/list_block_test.rb b/test/unit/list_block_test.rb index c5882ad..edcaf6f 100644 --- a/test/unit/list_block_test.rb +++ b/test/unit/list_block_test.rb @@ -1,7 +1,7 @@ require File.dirname(__FILE__) + '/../test_helper' class ListBlockTest < Test::Unit::TestCase - fixtures :blocks + fixtures :design_blocks # Replace this with your real tests. def test_truth -- libgit2 0.21.2