X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/059813befe57bab83dbc84627149f1af08d1c850..94f498a0718776efa90193c918c6dd22f51329ac:/test/functional/graph_controller_test.rb?ds=sidebyside diff --git a/test/functional/graph_controller_test.rb b/test/functional/graph_controller_test.rb index e147707..f9d4392 100644 --- a/test/functional/graph_controller_test.rb +++ b/test/functional/graph_controller_test.rb @@ -19,15 +19,15 @@ class GraphControllerTest < Test::Unit::TestCase # TODO Replace this with your actual tests def test_show_nonexist_votes_per_interval - assert_nothing_raised { get :votes_per_interval, { :id => 42 } } + assert_raise(ActiveRecord::RecordNotFound) { get :votes_per_interval, { :id => 42 } } end def test_show_nonexist_borda_bar - assert_nothing_raised { get :borda_bar, { :id => 42 } } + assert_raise(ActiveRecord::RecordNotFound) { get :borda_bar, { :id => 42 } } end def test_show_nonexist_choices_positions - assert_nothing_raised { get :choices_positions, { :id => 42 } } + assert_raise(ActiveRecord::RecordNotFound) { get :choices_positions, { :id => 42 } } end def test_show_empty_votes_per_interval @@ -102,7 +102,7 @@ class GraphControllerTest < Test::Unit::TestCase private def make_election - e=ElectionStruct.new( :name => "test", :description => "This is a test", + e=QuickVoteStruct.new( :name => "test", :description => "This is a test", :candidate_names => ['choice1', 'choice2', 'choice3']) @SS.create_quickvote e @election = @SS.list_quickvotes[0]