Changeset 147
- Timestamp:
- 02/08/07 21:02:59 (2 years ago)
- Files:
-
- trunk/demo/test/unit/shared_index1_test.rb (modified) (2 diffs)
- trunk/demo/test/unit/shared_index2_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/demo/test/unit/shared_index1_test.rb
r60 r147 47 47 end 48 48 49 def test_query_for_record 50 assert_match /SharedIndex1/, shared_index1s(:first).query_for_record.to_s 51 end 52 49 53 def test_destroy 50 54 result = SharedIndex1.find_by_contents("first OR another", :models => :all) … … 53 57 result = SharedIndex1.find_by_contents("first OR another", :models => :all) 54 58 assert_equal 3, result.size 59 shared_index2s(:first).destroy 60 result = SharedIndex1.find_by_contents("first OR another", :models => :all) 61 assert_equal 2, result.size 55 62 end 56 63 trunk/demo/test/unit/shared_index2_test.rb
r60 r147 2 2 3 3 class SharedIndex2Test < Test::Unit::TestCase 4 fixtures :shared_index2s 4 fixtures :shared_index2s, :shared_index1s 5 5 6 # Replace this with your real tests. 7 def test_truth 8 assert true 6 def setup 7 SharedIndex1.rebuild_index(SharedIndex2) 8 end 9 10 def test_query_for_record 11 assert_match /SharedIndex2/, shared_index2s(:first).query_for_record.to_s 9 12 end 10 13 end
