Sha256: 4f32a5c49c6faf66208307d026a358ee2d62a658461dd691d2c19f34d3db231c

Contents?: true

Size: 1.15 KB

Versions: 25

Compression:

Stored size: 1.15 KB

Contents

# Load the helper class
require File.join(File.dirname(__FILE__), '..', '..', 'test_helper')

module TaliaCore
  # Test the DataRecord storage class
  class DataRecordTest < ActiveSupport::TestCase

    fixtures :active_sources, :data_records

    def setup
      @test_records = DataTypes::DataRecord.find_data_records(Fixtures.identify(:something))

      @image_mime_types = ['image/gif', 'image/jpeg', 'image/png', 'image/tiff', 'image/bmp']
    end

    # test not nil and records numbers
    def test_records_numbers
      assert_not_equal [], @test_records
      assert_equal 15, @test_records.size
    end

    # test class type and mime_type
    def test_mime_types
      assert_kind_of(DataTypes::SimpleText, @test_records[0])
      assert_kind_of(DataTypes::SimpleText, @test_records[1])
      assert_equal("text/plain", @test_records[0].mime_type)
      assert_equal("text/plain", @test_records[1].mime_type)
    end



    # test for specific classes methods
    def test_specific_classes_methods
      # Get a line
      line = "LINE1: This is a simple text to check the DataRecords class\n"
      assert_equal(line, @test_records[0].get_line)
    end

  end  
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
talia_core-0.7.0 test/talia_core/data_types/data_record_test.rb
talia_core-0.5.4 test/talia_core/data_types/data_record_test.rb
talia_core-0.5.3 test/talia_core/data_types/data_record_test.rb
talia_core-0.5.2 test/talia_core/data_types/data_record_test.rb
talia_core-0.5.1 test/talia_core/data_types/data_record_test.rb
talia_core-0.5.0 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.22 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.20 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.19 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.18 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.17 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.16 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.15 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.14 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.13 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.12 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.11 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.10 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.9 test/talia_core/data_types/data_record_test.rb
talia_core-0.4.8 test/talia_core/data_types/data_record_test.rb