# frozen_string_literal: true
require 'test_helper'

class RakeTaskTest < ActiveSupport::TestCase
  test 'regression test for rake reminders' do
    assert_equal 1, Project.projects_to_remind.size
    result = system 'rake reminders >/dev/null'
    assert result
    assert_equal 0, Project.projects_to_remind.size
  end
end

# frozen_string_literal: true
require 'test_helper'
require 'database_cleaner'
DatabaseCleaner.strategy = :transaction

class RakeTaskTest < ActiveSupport::TestCase
  # When using DatabaseCleaner, transactional fixtures must be off.
  self.use_transactional_tests = false

  setup do
    # Start DatabaseCleaner before each test.
    DatabaseCleaner.start
  end

  teardown do
    # Clean up the database with DatabaseCleaner after each test.
    DatabaseCleaner.clean
  end

  test 'regression test for rake reminders' do
    assert_equal 1, Project.projects_to_remind.size
    result = system 'rake reminders >/dev/null'
    assert result
    assert_equal 0, Project.projects_to_remind.size
  end
end

Fix seed issue with rakeTaskTest regression test
Fix seed issue with rakeTaskTest regression test

Signed-off-by: Jason Dossett <e6f895edd39634df23774f0615e338f58a73f02c@utdallas.edu>
