Sha256: 81617ee7c4e7ba0fe020ced1a909e26cae0ec8db0bdbf27f695c5990bd0814d0
Contents?: true
Size: 603 Bytes
Versions: 21
Compression:
Stored size: 603 Bytes
Contents
require 'helper' class UpdateTest < Test::Unit::TestCase should "only update the given white listed attributes" do event = Event.new(:password => "original") start_date = Time.zone.now end_date = start_date.tomorrow event.safe_update(%w[start_date end_date], {"start_date" => start_date, "end_date" => end_date, "password" => "hacked"}) event.password.should == "original" event.start_date.to_s.should == start_date.to_s event.end_date.to_s.should == end_date.to_s end end
Version data entries
21 entries across 21 versions & 2 rubygems
Version | Path |
---|---|
mongomapper_ext-0.0.4 | test/test_update.rb |