From 29920c016fe89aa513207e282c80937d06a4f15f Mon Sep 17 00:00:00 2001 From: Jayamala Date: Tue, 6 Aug 2024 15:09:31 -0400 Subject: [PATCH] detect hidden flag updated --- test/test_bag_adapter.rb | 4 ++-- test/test_bag_courier.rb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test_bag_adapter.rb b/test/test_bag_adapter.rb index 02c8b8f..ed4cc66 100644 --- a/test/test_bag_adapter.rb +++ b/test/test_bag_adapter.rb @@ -135,7 +135,7 @@ def test_check_if_valid_when_hidden_file_not_in_manifest_and_detect_hidden_true bag = BagAdapter::BagAdapter.new(target_dir: @test_dir_path, detect_hidden: true) result = bag.check_if_valid refute result.is_valid - assert result.error_message.length > 0 + assert result.error_message end def test_check_if_valid_when_hidden_file_in_manifest_and_detect_hidden_false @@ -143,7 +143,7 @@ def test_check_if_valid_when_hidden_file_in_manifest_and_detect_hidden_false bag = BagAdapter::BagAdapter.new(target_dir: @test_dir_path, detect_hidden: false) result = bag.check_if_valid refute result.is_valid - assert result.error_message.length > 0 + assert result.error_message end def test_check_if_valid_when_hidden_file_not_in_manifest_and_detect_hidden_false diff --git a/test/test_bag_courier.rb b/test/test_bag_courier.rb index 6f6b468..1beb032 100644 --- a/test/test_bag_courier.rb +++ b/test/test_bag_courier.rb @@ -147,7 +147,7 @@ def create_courier( end def test_deliver_with_dry_run_false - courier = create_courier(dry_run: false, target_client: @mock_target_client, detect_hidden: false) + courier = create_courier(dry_run: false, detect_hidden: @detect_hidden, target_client: @mock_target_client) expected_tar_file_path = File.join(@export_path, @bag_id.to_s + ".tar") @mock_target_client.expect(:remote_text, "AWS S3 remote location in bucket fake") @mock_target_client.expect(:send_file, nil, local_file_path: expected_tar_file_path) @@ -173,7 +173,7 @@ def test_deliver_with_dry_run_false end def test_deliver_with_dry_run - courier = create_courier(dry_run: true, target_client: @mock_target_client, detect_hidden: false) + courier = create_courier(dry_run: true, detect_hidden: @detect_hidden, target_client: @mock_target_client) courier.deliver @mock_target_client.verify @@ -189,7 +189,7 @@ def test_deliver_with_dry_run end def test_deliver_when_deposit_raises_error - courier = create_courier(dry_run: false, target_client: @aptrust_target_client, detect_hidden: false) + courier = create_courier(dry_run: false, detect_hidden: @detect_hidden, target_client: @aptrust_target_client) raise_error = proc { raise RemoteClient::RemoteClientError, "specific details" } @aptrust_target_client.stub :send_file, raise_error do courier.deliver @@ -203,7 +203,7 @@ def test_deliver_when_deposit_raises_error end def test_deliver_with_remove_export - courier = create_courier(dry_run: false, target_client: @mock_target_client, remove_export: true, detect_hidden: false) + courier = create_courier(dry_run: false, detect_hidden: @detect_hidden, target_client: @mock_target_client, remove_export: true) expected_tar_file_path = File.join(@export_path, @bag_id.to_s + ".tar") @mock_target_client.expect(:remote_text, "AWS S3 remote location in bucket fake") @mock_target_client.expect(:send_file, nil, local_file_path: expected_tar_file_path)