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
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