Sha256: a69bf605397bc61faf761963dfcef219d30361d2f5a2d1576dc30e553f0f55ca

Contents?: true

Size: 704 Bytes

Versions: 51

Compression:

Stored size: 704 Bytes

Contents

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

class VoteHelperTest < ActiveSupport::TestCase
  def vote
    RedmineCrm::ActsAsVotable::Vote.new
  end

  def test_know_that_like_is_a_true_vote
    assert vote.votable_words.that_mean_true.include? "like"
  end

  def test_know_that_bad_is_a_false_vote
    assert vote.votable_words.that_mean_false.include? "bad"
  end

  def test_be_a_vote_for_true_when_word_is_good
    assert vote.votable_words.meaning_of('good')
  end

  def test_be_a_vote_for_false_when_word_is_down
    assert !vote.votable_words.meaning_of('down')
  end

  def test_be_a_vote_for_true_when_the_word_is_unknown
    assert vote.votable_words.meaning_of('lsdhklkadhfs')
  end

end

Version data entries

51 entries across 51 versions & 2 rubygems

Version Path
redmine_crm-0.0.21 test/vote_helper_test.rb
redmine_crm-0.0.20 test/vote_helper_test.rb
redmine_crm-0.0.19 test/vote_helper_test.rb
redmine_crm-0.0.18 test/vote_helper_test.rb
redmine_crm-0.0.17 test/vote_helper_test.rb
redmine_crm-0.0.16 test/vote_helper_test.rb
redmine_crm-0.0.14 test/vote_helper_test.rb
redmine_crm-0.0.13 test/vote_helper_test.rb
redmine_crm-0.0.12 test/vote_helper_test.rb
redmine_crm-0.0.11 test/vote_helper_test.rb
redmine_crm-0.0.10 test/vote_helper_test.rb