no voting reminders for managers
This commit is contained in:
parent
cb6dccded8
commit
3c0627e9ea
@ -26,7 +26,8 @@ class ReviewerReminder
|
|||||||
from reviewer_votes rev
|
from reviewer_votes rev
|
||||||
inner join users u on u.id = rev.user_id
|
inner join users u on u.id = rev.user_id
|
||||||
inner join candidates c on c.id = rev.candidate_id
|
inner join candidates c on c.id = rev.candidate_id
|
||||||
where rev.vote = 0 and rev.veto = 0 and u.active is not false;"
|
where rev.vote = 0 and rev.veto = 0
|
||||||
|
and u.role != 'manager' and u.active is not false;"
|
||||||
ActiveRecord::Base.connection.exec_query(sql)
|
ActiveRecord::Base.connection.exec_query(sql)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class ReviewerReminderTest < ActiveSupport::TestCase
|
class ReviewerReminderTest < ActiveSupport::TestCase
|
||||||
test "collection is created with four results" do
|
test "collection is created with results" do
|
||||||
reminders = ReviewerReminder.new
|
reminders = ReviewerReminder.new
|
||||||
assert_equal 3, reminders.size
|
assert_equal 6, reminders.size
|
||||||
end
|
end
|
||||||
|
|
||||||
test "each reminder has needed attributes" do
|
test "each reminder has needed attributes" do
|
||||||
|
Loading…
Reference in New Issue
Block a user