From 173c8a8759b9297b99cb536348ae549a07e2a3b9 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Fri, 4 Dec 2009 09:27:08 -0300 Subject: [PATCH] Fixing LocationBlock tests --- test/unit/localization_block_test.rb | 36 ------------------------------------ test/unit/location_block_test.rb | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 36 deletions(-) delete mode 100644 test/unit/localization_block_test.rb create mode 100644 test/unit/location_block_test.rb diff --git a/test/unit/localization_block_test.rb b/test/unit/localization_block_test.rb deleted file mode 100644 index 7e3921d..0000000 --- a/test/unit/localization_block_test.rb +++ /dev/null @@ -1,36 +0,0 @@ -require File.dirname(__FILE__) + '/../test_helper' - -class LocalizationBlockTest < Test::Unit::TestCase - - def setup - @profile = create_user('lele').person - @block = LocalizationBlock.new - @profile.boxes.first.blocks << @block - @block.save! - end - attr_reader :block, :profile - - should 'provide description' do - assert_not_equal Block.description, LocalizationBlock.description - end - - should 'display no localization map without lat' do - assert_tag_in_string block.content.call, :tag => 'i' - end - - should 'display localization map' do - profile.lat = 0 - profile.lng = 0 - profile.save! - assert_tag_in_string block.content.call, :tag => 'img' - end - - should 'be editable' do - assert LocalizationBlock.new.editable? - end - - should 'default title be blank by default' do - assert_equal '', LocalizationBlock.new.title - end - -end diff --git a/test/unit/location_block_test.rb b/test/unit/location_block_test.rb new file mode 100644 index 0000000..e8f810c --- /dev/null +++ b/test/unit/location_block_test.rb @@ -0,0 +1,36 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class LocationBlockTest < Test::Unit::TestCase + + def setup + @profile = create_user('lele').person + @block = LocationBlock.new + @profile.boxes.first.blocks << @block + @block.save! + end + attr_reader :block, :profile + + should 'provide description' do + assert_not_equal Block.description, LocationBlock.description + end + + should 'display no localization map without lat' do + assert_tag_in_string block.content, :tag => 'i' + end + + should 'display localization map' do + profile.lat = 0 + profile.lng = 0 + profile.save! + assert_tag_in_string block.content, :tag => 'img' + end + + should 'be editable' do + assert LocationBlock.new.editable? + end + + should 'default title be blank by default' do + assert_equal '', LocationBlock.new.title + end + +end -- libgit2 0.21.2