Sha256: 34c65d01d49bbe5a54224ee3d8239c977fdc10b01529da69fe8b395d512640c5

Contents?: true

Size: 572 Bytes

Versions: 4

Compression:

Stored size: 572 Bytes

Contents

require 'test_helper'

class TestIdGeneration < Test::Unit::TestCase
  should "use UUIDs for attachment IDs" do
    a = Progstr::Filer::Attachment.from_file(MockUploader, :avatar, FileMock.new)
    b = Progstr::Filer::Attachment.from_file(MockUploader, :avatar, FileMock.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(MockUploader, :avatar, FileMock.new)
    assert_match /^[^-]+$/, a.id, "IDs should contain no hyphens"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
progstr-filer-0.8.11 test/test_id_generation.rb
progstr-filer-0.8.10 test/test_id_generation.rb
progstr-filer-0.8.9 test/test_id_generation.rb
progstr-filer-0.8.8 test/test_id_generation.rb