reminder name refactor

This commit is contained in:
Mark Moser 2017-02-08 16:30:54 -06:00
parent 58d3fbd7c2
commit 5f3dfb5c96
3 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
# frozen_string_literal: true
class Reminder
class CandidateReminder
def initialize
@collection = reminder_collection
end

View File

@ -2,7 +2,7 @@
namespace :reminders do
desc "send reminders to stagnate quizes"
task send_all: :environment do
reminders = Reminder.new
reminders = CandidateReminder.new
reminders.send_all
end
end

View File

@ -1,14 +1,14 @@
# frozen_string_literal: true
require 'test_helper'
class ReminderTest < ActiveSupport::TestCase
class CandidateReminderTest < ActiveSupport::TestCase
test "collection is created with one result" do
reminders = Reminder.new
reminders = CandidateReminder.new
assert_equal 1, reminders.size
end
test "each candidate has needed attributes" do
reminders = Reminder.new
reminders = CandidateReminder.new
assert_instance_of String, reminders.candidates.first.name
assert_instance_of String, reminders.candidates.first.test_hash
@ -16,7 +16,7 @@ class ReminderTest < ActiveSupport::TestCase
end
test "send reminders sends email, and flags reminded" do
reminders = Reminder.new
reminders = CandidateReminder.new
pre_reminded = Candidate.find(reminders.candidates.first.id).reminded
assert_difference("ActionMailer::Base.deliveries.size", reminders.count) do