diff --git a/app/policies/reviewer_vote_policy.rb b/app/policies/reviewer_vote_policy.rb index 00f28a7..a5d2193 100644 --- a/app/policies/reviewer_vote_policy.rb +++ b/app/policies/reviewer_vote_policy.rb @@ -21,13 +21,7 @@ class ReviewerVotePolicy < ApplicationPolicy user.acts_as_reviewer? end - def approve? - return true if user.acts_as_admin? - return false unless record.candidate.reviewers.include? user - user.acts_as_manager? - end - - def decline? + def interview_request? return true if user.acts_as_admin? return false unless record.candidate.reviewers.include? user user.acts_as_manager? diff --git a/test/policies/reviewer_vote_policy_test.rb b/test/policies/reviewer_vote_policy_test.rb index 95c8e82..e529e10 100644 --- a/test/policies/reviewer_vote_policy_test.rb +++ b/test/policies/reviewer_vote_policy_test.rb @@ -48,15 +48,7 @@ class ReviewerVotePolicyTest < PolicyAssertions::Test refute_permit users(:manager), reviewer_votes(:gustov) end - def approve - assert_permit users(:manager), reviewer_votes(:manager_richard) - assert_permit users(:admin), reviewer_votes(:manager_henry) - - refute_permit users(:recruiter), reviewer_votes(:manager_henry) - refute_permit users(:reviewer), reviewer_votes(:reviewer_richard) - end - - def decline + def interview_request assert_permit users(:manager), reviewer_votes(:manager_richard) assert_permit users(:admin), reviewer_votes(:manager_henry)