Sha256: f21708a19e9e9732492813a415ee8fbcb5bdce2dd265fab621ce694cf90144b0
Contents?: true
Size: 1.15 KB
Versions: 4
Compression:
Stored size: 1.15 KB
Contents
# -*- encoding : utf-8 -*- describe Card::Set::Self::All do before do @all = Card[:all] end context '#update' do it 'should be trigger empty trash (with right params)' do Card::Auth.as_bot do Card['A'].delete! Card.where( :trash=>true ).should_not be_empty Card::Env.params[:task] = :empty_trash @all.update_attributes({}) Card.where( :trash=>true ).should be_empty end end it 'should be trigger deleting old revisions (with right params)' do Card::Auth.as_bot do a = Card['A'] a.update_attributes! :content=>'a new day' a.revisions.count.should == 2 Card::Env.params[:task] = :delete_old_revisions @all.update_attributes({}) a.revisions.count.should == 1 end end =begin it 'should be trigger reference repair' do Card::Auth.as_bot do a = Card['A'] puts a.references_to.count Card::Env.params[:task] = :repair_references puts a.references_to.count @all.update_attributes({}) puts a.references_to.count end end =end end end
Version data entries
4 entries across 4 versions & 1 rubygems