+ trace.import
+
+ assert trace.image.attached?
+ end
+
+ def test_import_handles_bz2
+ trace = create(:trace, :inserted => false, :fixture => "c")
+
+ trace.import
+
+ assert_equal 1, trace.size
+ end
+
+ def test_import_handles_plain
+ trace = create(:trace, :inserted => false, :fixture => "a")
+
+ trace.import
+
+ assert_equal 1, trace.size
+ end
+
+ def test_import_handles_plain_with_bom
+ trace = create(:trace, :inserted => false, :fixture => "b")
+
+ trace.import
+
+ assert_equal 1, trace.size
+ end
+
+ def test_import_handles_gz
+ trace = create(:trace, :inserted => false, :fixture => "d")
+
+ trace.import
+
+ assert_equal 1, trace.size
+ end
+
+ def test_import_handles_zip
+ trace = create(:trace, :inserted => false, :fixture => "f")
+
+ trace.import
+
+ assert_equal 2, trace.size
+ end
+
+ def test_import_handles_tar
+ trace = create(:trace, :inserted => false, :fixture => "g")
+
+ trace.import
+
+ assert_equal 2, trace.size
+ end
+
+ def test_import_handles_tar_gz
+ trace = create(:trace, :inserted => false, :fixture => "h")
+
+ trace.import
+
+ assert_equal 2, trace.size
+ end
+
+ def test_import_handles_tar_bz2
+ trace = create(:trace, :inserted => false, :fixture => "i")
+
+ trace.import
+
+ assert_equal 2, trace.size