Sha256: b389292def6fccdb03c77227c9e26179a3794b9cac49ff3f6203eb4a660c69ef

Contents?: true

Size: 682 Bytes

Versions: 5

Compression:

Stored size: 682 Bytes

Contents

require 'test_helper'

class <%= file_name.classify %>Test < ActiveSupport::TestCase
  test '<%= options[:attr_name] %> is wired correctly' do
    <%= file_name %> = <%= file_name.tableize %>(:ruby)

    assert_equal 'image/png', <%= file_name %>.<%= options[:attr_name] %>.mime_type
    assert_equal 'ruby.png', <%= file_name %>.<%= options[:attr_name] %>.original_name
    assert_equal file_blob_id('files/ruby.png'), <%= file_name %>.<%= options[:attr_name] %>.blob.id
    assert_equal file_blob_size('files/ruby.png'), <%= file_name %>.<%= options[:attr_name] %>.size
    assert_equal file_blob_data('files/ruby.png'), <%= file_name %>.<%= options[:attr_name] %>.data
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
file_blobs_rails-0.2.3 lib/file_blobs_rails/generators/templates/blob_owner_test.rb.erb
file_blobs_rails-0.2.2 lib/file_blobs_rails/generators/templates/blob_owner_test.rb.erb
file_blobs_rails-0.2.1 lib/file_blobs_rails/generators/templates/blob_owner_test.rb.erb
file_blobs_rails-0.2.0 lib/file_blobs_rails/generators/templates/blob_owner_test.rb.erb
file_blobs_rails-0.1.0 lib/file_blobs_rails/generators/templates/blob_owner_test.rb.erb