Skip to content

Commit

Permalink
test: fix issues with file locn and tii features
Browse files Browse the repository at this point in the history
  • Loading branch information
macite committed Jul 22, 2024
1 parent b868799 commit 4e38e6c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/api/tii/tii_action_api_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def app

setup do
TiiAction.delete_all

setup_tii_features_enabled
setup_tii_eula

# Create a task definition with two attachments
Expand Down
2 changes: 1 addition & 1 deletion test/models/task_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ def test_pdf_creation_fails_on_invalid_pdf
folder = FileHelper.student_work_dir(:new, task)

# Copy the file in
FileUtils.cp('test_files/submissions/corrupted.pdf', "#{folder}/001-code.cs")
FileUtils.cp(Rails.root.join('test_files/submissions/corrupted.pdf'), "#{folder}/001-code.cs")

begin
assert_not task.convert_submission_to_pdf(log_to_stdout: false)
Expand Down
4 changes: 4 additions & 0 deletions test/models/tii_user_accept_eula_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class TiiUserAcceptEulaTest < ActiveSupport::TestCase
include TestHelpers::TiiTestHelper

def test_can_accept_tii_eula
setup_tii_features_enabled
setup_tii_eula

assert TurnItIn.eula_version.present?
Expand Down Expand Up @@ -36,6 +37,7 @@ def test_can_accept_tii_eula

def test_eula_accept_will_retry
TiiAction.destroy_all
setup_tii_features_enabled
setup_tii_eula

user = FactoryBot.create(:user)
Expand Down Expand Up @@ -102,6 +104,7 @@ def test_eula_accept_will_retry
end

def test_eula_accept_rate_limit
setup_tii_features_enabled
setup_tii_eula

# Prepare stub for call when eula is accepted and it fails
Expand Down Expand Up @@ -137,6 +140,7 @@ def test_eula_accept_rate_limit
end

def test_eula_respects_global_errors
setup_tii_features_enabled
setup_tii_eula

# Prepare stub for call when eula is accepted and it fails
Expand Down
3 changes: 2 additions & 1 deletion test/sidekiq/tii_check_progress_job_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class TiiCheckProgressJobTest < ActiveSupport::TestCase

def test_check_eula_change
TiiAction.delete_all

setup_tii_features_enabled
setup_tii_eula

# Create a task definition with two attachments
Expand Down Expand Up @@ -217,6 +217,7 @@ def test_that_progress_checks_eula_change

def test_waits_to_process_action
setup_tii_eula
setup_tii_features_enabled

# Will test with user eula
user = FactoryBot.create(:user)
Expand Down

0 comments on commit 4e38e6c

Please sign in to comment.