Sha256: 290b220eb51c80e44da811b007813cac0b5677bb5ee7232261e287aa7207f80c

Contents?: true

Size: 630 Bytes

Versions: 12

Compression:

Stored size: 630 Bytes

Contents

require 'test_helper'

class UserstampsTest < Test::Unit::TestCase
  context "userstamping" do
    setup do
      @document = Doc do
        set_collection_name 'users'
        userstamps!
      end
    end

    should "add creator_id key" do
      @document.keys.keys.should include('creator_id')
    end

    should "add updater_id key" do
      @document.keys.keys.should include('updater_id')
    end

    should "add belongs_to creator" do
      @document.associations.keys.should include('creator')
    end

    should "add belongs_to updater" do
      @document.associations.keys.should include('updater')
    end
  end
end

Version data entries

12 entries across 12 versions & 5 rubygems

Version Path
pwnash-mongo_mapper-0.7.5 test/functional/test_userstamps.rb
mongo_mapper-0.7.5 test/functional/test_userstamps.rb
mongo_mapper_ign-0.7.4 test/functional/test_userstamps.rb
mongo_mapper-0.7.4 test/functional/test_userstamps.rb
mongo_mapper-0.7.3 test/functional/test_userstamps.rb
numon-0.0.1 test/functional/test_userstamps.rb
mongo_mapper-0.7.2 test/functional/test_userstamps.rb
mongo_mapper-0.7.1 test/functional/test_userstamps.rb
mongo_mapper-unstable-2010.3.8 test/functional/test_userstamps.rb
mongo_mapper-unstable-2010.3.5 test/functional/test_userstamps.rb
mongo_mapper-unstable-2010.3.4 test/functional/test_userstamps.rb
mongo_mapper-unstable-2010.3.3 test/functional/test_userstamps.rb