Skip to content

Commit

Permalink
proper order
Browse files Browse the repository at this point in the history
  • Loading branch information
jmilljr24 committed Dec 20, 2024
1 parent 642fa20 commit 419f070
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/services/organizations/csv_import_service_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class CsvImportServiceTest < ActiveSupport::TestCase
turbo_stream = capture_turbo_stream_broadcasts ["csv_import", @adopter]

assert_equal "File scanned: 1 error(s) present", turbo_stream.first.at_css(".alert-heading").text.strip
assert_equal errors.first[1].message, "mon out of range"
assert_equal "mon out of range", errors.first[1].message
end

should "validate file type" do
Expand All @@ -125,7 +125,7 @@ class CsvImportServiceTest < ActiveSupport::TestCase
assert_turbo_stream_broadcasts ["csv_import", @adopter]
turbo_stream = capture_turbo_stream_broadcasts ["csv_import", @adopter]
assert_equal "File scanned: 1 error(s) present", turbo_stream.first.at_css(".alert-heading").text.strip
assert_equal errors.first[1].message, "Invalid File Type: File type must be CSV"
assert_equal "Invalid File Type: File type must be CSV", errors.first[1].message
end

should "validate email header" do
Expand All @@ -146,7 +146,7 @@ class CsvImportServiceTest < ActiveSupport::TestCase
assert_turbo_stream_broadcasts ["csv_import", @adopter]
turbo_stream = capture_turbo_stream_broadcasts ["csv_import", @adopter]
assert_equal "File scanned: 1 error(s) present", turbo_stream.first.at_css(".alert-heading").text.strip
assert_equal errors.first[1].message, 'The column header "Email" was not found in the attached csv'
assert_equal 'The column header "Email" was not found in the attached csv', errors.first[1].message
end

should "validate Timestamp header" do
Expand All @@ -167,7 +167,6 @@ class CsvImportServiceTest < ActiveSupport::TestCase
assert_turbo_stream_broadcasts ["csv_import", @adopter]
turbo_stream = capture_turbo_stream_broadcasts ["csv_import", @adopter]
assert_equal "File scanned: 1 error(s) present", turbo_stream.first.at_css(".alert-heading").text.strip
assert_equal errors.first[1].message, 'The column header "Timestamp" was not found in the attached csv'
end
assert_equal 'The column header "Timestamp" was not found in the attached csv', errors.first[1].message end
end
end

0 comments on commit 419f070

Please sign in to comment.