projects
/
selectricity
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename Selectricity API calls to more explicitly call itself quickvotes.
[selectricity]
/
test
/
functional
/
graph_controller_test.rb
diff --git
a/test/functional/graph_controller_test.rb
b/test/functional/graph_controller_test.rb
index e1477079f81cd1400bd2fffa0931c90f51d767cb..f9d4392242d22ab736f0d74e63ea90bb18b94145 100644
(file)
--- 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
# 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
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
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
end
def test_show_empty_votes_per_interval
@@
-102,7
+102,7
@@
class GraphControllerTest < Test::Unit::TestCase
private
def make_election
private
def make_election
- e=
Election
Struct.new( :name => "test", :description => "This is a test",
+ e=
QuickVote
Struct.new( :name => "test", :description => "This is a test",
:candidate_names => ['choice1', 'choice2', 'choice3'])
@SS.create_quickvote e
@election = @SS.list_quickvotes[0]
:candidate_names => ['choice1', 'choice2', 'choice3'])
@SS.create_quickvote e
@election = @SS.list_quickvotes[0]
Benjamin Mako Hill
||
Want to submit a patch?