Sha256: 9f397f9d26a038a784ce4fddcb638d00b03cd4e3d19742c2b18ac1b498c9ab5d
Contents?: true
Size: 907 Bytes
Versions: 22
Compression:
Stored size: 907 Bytes
Contents
require 'helper' class TestMongoMapper < Test::Unit::TestCase def setup load_fixture 'mongo_mapper' end context 'for mongomapper functionality' do should 'check required fields' do account = Account.create assert ! account.valid? end should 'correctly create an account' do account = Account.create(:email => "jack@metal.org", :role => "some", :password => "some", :password_confirmation => "some") assert account.valid? end should 'correctly authenticate an account' do account = Account.create(:email => "auth@lipsia.org", :role => "some", :password => "some", :password_confirmation => "some") assert account.valid? assert ! account.id.nil? assert_equal "some", account.password_clean account_r = Account.first(:conditions => { :email => "auth@lipsia.org" }) assert_equal account_r, account end end end
Version data entries
22 entries across 22 versions & 1 rubygems