- result = invoke_delegated :vote, :create_quickvote, election
- assert_instance_of String, result
- assert_equal "", result
- assert_equal(invoke_delegated(:vote,:list_quickvotes).length, 1)
- end
- def test_get_quickvote
- test_create_quickvote
- result = invoke_delegated :vote, :get_quickvote, "TestVote"
- assert_instance_of ElectionStruct, result
- assert_equal 0, result.name.casecmp("TestVote")
- assert_equal result.description, "Test Vote"
- assert_equal result.candidate_names.sort, ["Apple", "Orange", "Banana", "Pineapple"].sort
- assert_not_nil result.id
- assert result.id != 0
- assert_nil result.candidate_ids.uniq!
- assert result.candidate_ids.length == result.candidate_names.length