+++ /dev/null
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-first:
- id: 1
-another:
- id: 2
+++ /dev/null
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-first:
- id: 1
-another:
- id: 2
+++ /dev/null
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-first:
- id: 1
-another:
- id: 2
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end
-
- def test_index
- get :index
- assert_response :success
- assert_template 'list'
- end
-
- def test_list
- get :list
-
- assert_response :success
- assert_template 'list'
-
- assert_not_nil assigns(:elections)
- end
-
- def test_show
- get :show, :id => 1
-
- assert_response :success
- assert_template 'show'
-
- assert_not_nil assigns(:election)
- assert assigns(:election).valid?
- end
-
- def test_new
- get :new
-
- assert_response :success
- assert_template 'new'
-
- assert_not_nil assigns(:election)
- end
-
- def test_create
- num_elections = Election.count
-
- post :create, :election => {}
-
- assert_response :redirect
- assert_redirected_to :action => 'list'
-
- assert_equal num_elections + 1, Election.count
- end
-
- def test_edit
- get :edit, :id => 1
-
- assert_response :success
- assert_template 'edit'
-
- assert_not_nil assigns(:election)
- assert assigns(:election).valid?
- end
-
- def test_update
- post :update, :id => 1
- assert_response :redirect
- assert_redirected_to :action => 'show', :id => 1
- end
-
- def test_destroy
- assert_not_nil Election.find(1)
-
- post :destroy, :id => 1
- assert_response :redirect
- assert_redirected_to :action => 'list'
-
- assert_raise(ActiveRecord::RecordNotFound) {
- Election.find(1)
- }
+ def test_true
+ #Make rake happy when empty
+ assert true
end
end
+++ /dev/null
-require File.dirname(__FILE__) + '/../test_helper'
-
-class FullVoterTest < Test::Unit::TestCase
- fixtures :full_voters
-
- # Replace this with your real tests.
- def test_truth
- assert true
- end
-end
+++ /dev/null
-require File.dirname(__FILE__) + '/../test_helper'
-
-class QuickVoteTest < Test::Unit::TestCase
- fixtures :quick_votes
-
- # Replace this with your real tests.
- def test_truth
- assert true
- end
-end
+++ /dev/null
-require File.dirname(__FILE__) + '/../test_helper'
-
-class QuickVoterTest < Test::Unit::TestCase
- fixtures :quick_voters
-
- # Replace this with your real tests.
- def test_truth
- assert true
- end
-end
+++ /dev/null
-require File.dirname(__FILE__) + '/../test_helper'
-
-class RawVoterListTest < Test::Unit::TestCase
- fixtures :raw_voter_lists
-
- # Replace this with your real tests.
- def test_truth
- assert_kind_of RawVoterList, raw_voter_lists(:first)
- end
-end
+++ /dev/null
-require File.dirname(__FILE__) + '/../test_helper'
-
-class VotesTest < Test::Unit::TestCase
- fixtures :votes
-
- # Replace this with your real tests.
- def test_truth
- assert_kind_of Votes, votes(:first)
- end
-end
+++ /dev/null
-require File.dirname(__FILE__) + '/../test_helper'
-require 'voter_notify'
-
-class VoterNotifyTest < Test::Unit::TestCase
- FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures'
- CHARSET = "utf-8"
-
- include ActionMailer::Quoting
-
- def setup
- ActionMailer::Base.delivery_method = :test
- ActionMailer::Base.perform_deliveries = true
- ActionMailer::Base.deliveries = []
-
- @expected = TMail::Mail.new
- @expected.set_content_type "text", "plain", { "charset" => CHARSET }
- end
-
- private
- def read_fixture(action)
- IO.readlines("#{FIXTURES_PATH}/voter_notify/#{action}")
- end
-
- def encode(subject)
- quoted_printable(subject, CHARSET)
- end
-end