Sha256: 369b57e0b7304778e9e30fec418ce6fc490b58f8745ad76802685d19dd15dadf
Contents?: true
Size: 702 Bytes
Versions: 31
Compression:
Stored size: 702 Bytes
Contents
RSpec.describe Card::Set::All::Codename do describe "codename" do let(:card) { Card["a"] } it "requires admin permission" do card.update codename: "structure" expect(card.errors[:codename].first).to match(/only admins/) end it "checks uniqueness" do Card::Auth.as_bot do card.update codename: "structure" expect(card.errors[:codename].first).to match(/already in use/) end end end describe "reset_codename_cache" do it "resets codename cache when codename is updated" do card = Card.create! name: "Codename Haver", codename: :codename_haver expect(Card::Codename.id(:codename_haver)).to eq(card.id) end end end
Version data entries
31 entries across 31 versions & 1 rubygems