From ee1466c8a08f1cb4e008936218c75980940bc24c Mon Sep 17 00:00:00 2001 From: John Dong Date: Fri, 17 Aug 2007 16:10:25 -0400 Subject: [PATCH] Correct a bunch of the testcases. Poor copy-and-paste led to description => nil where it shouldn't have been. Now a bunch more testcases FAIL. Yay me. --- test/unit/selectricityservice_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/selectricityservice_test.rb b/test/unit/selectricityservice_test.rb index e3f5906..6014c72 100644 --- a/test/unit/selectricityservice_test.rb +++ b/test/unit/selectricityservice_test.rb @@ -84,11 +84,11 @@ class SelectricityServiceTest < Test::Unit::TestCase assert_create_quickvote_fails election end def test_create_quickvote_candidates_nil - election = ElectionStruct.new :name => "foobar", :description => nil, :candidate_names => nil + election = ElectionStruct.new :name => "foobar", :description => "valid", :candidate_names => nil assert_create_quickvote_fails election end def test_create_quickvote_insufficient_candidates - election = ElectionStruct.new :name => "foobar", :description => nil, :candidate_names => ["Apple"] + election = ElectionStruct.new :name => "foobar", :description => "valid", :candidate_names => ["Apple"] assert_create_quickvote_fails election end def test_create_quickvote_candidates_whitespace @@ -96,11 +96,11 @@ class SelectricityServiceTest < Test::Unit::TestCase assert_create_quickvote_fails election end def test_create_quickvote_dupe_candidates - election = ElectionStruct.new :name => "foobar", :description => nil, :candidate_names => ["Apple", "Apple", "Apple", "Apple"] + election = ElectionStruct.new :name => "foobar", :description => "valid", :candidate_names => ["Apple", "Apple", "Apple", "Apple"] assert_create_quickvote_fails election end def test_create_quickvote_candidates_nil_mixed - election = ElectionStruct.new :name => "foobar", :description => nil, :candidate_names => ["Apple", nil ] + election = ElectionStruct.new :name => "foobar", :description => "valid", :candidate_names => ["Apple", nil ] assert_create_quickvote_fails election end def test_create_quickvote_description_htmlescape -- 2.30.2