Sha256: 166c9ec5b05973b351192bc4f29151374c030906d6398b4b1329e955ec8438ea
Contents?: true
Size: 682 Bytes
Versions: 9
Compression:
Stored size: 682 Bytes
Contents
require 'spec_helper' describe VestalVersions::Users do let(:updated_by){ User.create(:name => 'Steve Jobs') } let(:user){ User.create(:name => 'Steve Richert') } it 'defaults to nil' do user.update_attributes(:first_name => 'Stephen') user.versions.last.user.should be_nil end it 'accepts and returns an ActiveRecord user' do user.update_attributes(:first_name => 'Stephen', :updated_by => updated_by) user.versions.last.user.should == updated_by end it 'accepts and returns a string user name' do user.update_attributes(:first_name => 'Stephen', :updated_by => updated_by.name) user.versions.last.user.should == updated_by.name end end
Version data entries
9 entries across 9 versions & 6 rubygems