Sha256: f0d16ea5f45d3674fbe1c45272a2ddfb275be01e2fe9312606e207e7b44c1357

Contents?: true

Size: 574 Bytes

Versions: 4

Compression:

Stored size: 574 Bytes

Contents

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

class RupActsAsVotableTest < 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

4 entries across 4 versions & 1 rubygems

Version Path
redmineup-1.0.5 test/acts_as_votable/rup_acts_as_votable_test.rb
redmineup-1.0.4 test/acts_as_votable/rup_acts_as_votable_test.rb
redmineup-1.0.3 test/acts_as_votable/rup_acts_as_votable_test.rb
redmineup-1.0.2 test/acts_as_votable/rup_acts_as_votable_test.rb