Sha256: 87a2d2c6f78d108c0d8f09fdfc5c76612793882e50780bf4a535af24a0559590

Contents?: true

Size: 575 Bytes

Versions: 29

Compression:

Stored size: 575 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class RcrmActsAsVotableTest < ActiveSupport::TestCase

  class NotVotable < ActiveRecord::Base; end
  def test_that_votable_returns_false_unless_included
    assert_equal NotVotable.votable?, false
  end

  def test_that_votable_returns_true_if_included
    assert_equal Votable.votable?, true
  end

  def test_behaves_like_votable_model
    assert Voter.create(:name => 'i can vote!')
    assert VotableCache.create(:name => 'voting model with cache')
    assert VotableVoter.create(:name => 'i can vote too!')
  end
end

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
redmine_crm-0.0.43 test/acts_as_votable/rcrm_acts_as_votable_test.rb
redmine_crm-0.0.42 test/acts_as_votable/rcrm_acts_as_votable_test.rb
redmine_crm-0.0.41 test/acts_as_votable/rcrm_acts_as_votable_test.rb
redmine_crm-0.0.40 test/acts_as_votable/rcrm_acts_as_votable_test.rb
redmine_crm-0.0.38 test/acts_as_votable/rcrm_acts_as_votable_test.rb
yeshua_crm-1.0.1 test/acts_as_votable/rcrm_acts_as_votable_test.rb
yeshua_crm-1.0.0 test/acts_as_votable/rcrm_acts_as_votable_test.rb
yeshoua_crm-1.0.0 test/acts_as_votable/rcrm_acts_as_votable_test.rb
redmine_crm-0.0.37 test/acts_as_votable/rcrm_acts_as_votable_test.rb