Sha256: 3fd138ee7aaebb1646f794a3417bbc66bc04dcf9b7a280b50e02d72465afcb39

Contents?: true

Size: 530 Bytes

Versions: 8

Compression:

Stored size: 530 Bytes

Contents

require 'test_helper'

class TestIdGeneration < Test::Unit::TestCase
  should "use UUIDs for attachment IDs" do
    a = Progstr::Filer::Attachment.from_file(:avatar, FileLike.new)
    b = Progstr::Filer::Attachment.from_file(:avatar, FileLike.new)

    assert_not_nil a.id
    assert_not_nil b.id
    assert_not_equal a.id, b.id
  end

  should "have attachment IDs with no hyphens" do
    a = Progstr::Filer::Attachment.from_file(:avatar, FileLike.new)
    assert_match /^[^-]+$/, a.id, "IDs should contain no hyphens"
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
progstr-filer-0.8.7 test/test_id_generation.rb
progstr-filer-0.8.6 test/test_id_generation.rb
progstr-filer-0.8.5 test/test_id_generation.rb
progstr-filer-0.8.4 test/test_id_generation.rb
progstr-filer-0.8.3 test/test_id_generation.rb
progstr-filer-0.8.2 test/test_id_generation.rb
progstr-filer-0.8.1 test/test_id_generation.rb
progstr-filer-0.8.0 test/test_id_generation.rb