Sha256: f993ea1f6d4e8ccb6e3300a4ee73003077158a6f110c1f2e3817e6aa1cda1fac

Contents?: true

Size: 727 Bytes

Versions: 5

Compression:

Stored size: 727 Bytes

Contents

require_relative 'test_helper'

class TestExtensionsTest < ActiveSupport::TestCase
  setup do
    @ruby_path = File.expand_path '../fixtures/files/ruby.png', __FILE__
    @invoice_path = File.expand_path '../fixtures/files/invoice.pdf', __FILE__
  end

  test 'file_blob_data' do
    assert_equal File.binread(@ruby_path), file_blob_data('files/ruby.png')
    assert_equal File.binread(@invoice_path),
                  file_blob_data('files/invoice.pdf')
  end

  test 'file_blob_id' do
    assert_equal 'udXLga6YgZX7TR__OGt6NGw2u4ulhODFWndwUlwPoXU=',
                 file_blob_id('files/ruby.png')
    assert_equal '30aM5cShJnhiJJCLahmhdWjk31Cq9d7hKoIHiEf2VbM=',
                 file_blob_id('files/invoice.pdf')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
file_blobs_rails-0.2.3 test/test_extensions_test.rb
file_blobs_rails-0.2.2 test/test_extensions_test.rb
file_blobs_rails-0.2.1 test/test_extensions_test.rb
file_blobs_rails-0.2.0 test/test_extensions_test.rb
file_blobs_rails-0.1.0 test/test_extensions_test.rb