* Refactor testcase code -- create_quickvote_fails assertion -- was using same block...
authorJohn Dong <jdong@mit.edu>
Fri, 17 Aug 2007 20:02:31 +0000 (16:02 -0400)
committerJohn Dong <jdong@mit.edu>
Fri, 17 Aug 2007 20:02:31 +0000 (16:02 -0400)
commita7c9f5ae54334ea4c0c1308b931b143cf1449f48
treeffd8bea70a441ee7a85519f4019ab9041b2264be
parent3b4bd99898faa4b3ebdc78b2e5a2e7047c1a6450
* Refactor testcase code -- create_quickvote_fails assertion -- was using same block of code repetivitely

Add more testcases for improper data
  * Passing in a nil ElectionStruct to quickvotes
  * Passing in only nil {name, description, candidates}
  * Passing in whitespace for name, description, candidates
  * Passing in duplicate candidates
  * Passing in dirty HTML in description field
    - IMO this may not be a "bug" -- we should rather assert that the view will not be injected with HTML. It may be desirable (a feature) to store HTML-ish text in the database.
test/unit/selectricityservice_test.rb

Benjamin Mako Hill || Want to submit a patch?