Sha256: 6c9aa4b5dcd741362ef66023fd94b44ac2f82158a77708fe1de5929e27d62c3f
Contents?: true
Size: 855 Bytes
Versions: 19
Compression:
Stored size: 855 Bytes
Contents
# -*- encoding : utf-8 -*- describe Card::Set::All::Trash do it "certain 'all rules' should be indestructable" do Card::Auth.as_bot do name = '*all+*default' card = Card[name] card.delete expect(card.errors[:delete].first).to eq("#{name} is an indestructible rule") expect(Card[name]).to be end end it 'does not delete account with edits' do Card::Auth.as_bot do name = 'Joe User' card = Card[name] card.delete expect(card.errors[:delete].first).to match("Edits have been made with #{name}'s user account") expect(Card[name]).to be end end it 'deletes account without edits' do Card::Auth.as_bot do name = 'born to die' card = Card.create! :name=>name, :type_code=>:user card.delete expect(Card[name]).not_to be end end end
Version data entries
19 entries across 19 versions & 2 rubygems