2016-11-17 22:43:19 -06:00
|
|
|
# frozen_string_literal: true
|
|
|
|
require 'test_helper'
|
|
|
|
|
|
|
|
class ReviewerVoteTest < ActiveSupport::TestCase
|
|
|
|
test "the truth" do
|
|
|
|
assert ReviewerVoteTest
|
|
|
|
end
|
2016-11-18 17:43:24 -06:00
|
|
|
|
|
|
|
test "richard has 3 votes" do
|
|
|
|
richard = candidates(:richard)
|
|
|
|
|
|
|
|
assert_equal 3, richard.votes.size
|
|
|
|
end
|
|
|
|
|
|
|
|
test "manager has 4 votes" do
|
|
|
|
manager = users(:manager)
|
|
|
|
|
|
|
|
assert_equal 4, manager.votes.size
|
|
|
|
end
|
|
|
|
|
|
|
|
test "richard has been approved" do
|
|
|
|
richard = candidates(:richard)
|
|
|
|
|
|
|
|
assert richard.approved?
|
|
|
|
refute richard.declined?
|
|
|
|
end
|
|
|
|
|
|
|
|
test "stacy has been declined" do
|
|
|
|
stacy = candidates(:stacy)
|
|
|
|
|
|
|
|
assert stacy.declined?
|
|
|
|
refute stacy.approved?
|
|
|
|
end
|
2016-11-17 22:43:19 -06:00
|
|
|
end
|