Sha256: 296c4cc51be059a22ce91ce0179267ee1a089d24410646028720fff2741df321
Contents?: true
Size: 881 Bytes
Versions: 12
Compression:
Stored size: 881 Bytes
Contents
# -*- encoding : utf-8 -*- RSpec.describe Card::Set::Right::Roles do it "shark can't assign Administrator role", with_user: "Joe User" do card = Card.fetch "u1+*roles" card.update content: "Administrator" expect(card.errors[:permission_denied]) .to include(/You don't have permission to assign the role Administrator/) end it "shark can't assign Administrator to himself", with_user: "Joe User" do card = Card.fetch "Joe User+*roles" card.update content: "Administrator" expect(card.errors[:permission_denied]) .to include(/You don't have permission to assign the role Administrator/) end it "user can't change role", with_user: "Joe Camel" do card = Card.fetch "u1+*roles" card.update content: "Shark" expect(card.errors[:permission_denied]) .to include("You don't have permission to update u1+*roles") end end
Version data entries
12 entries across 12 versions & 1 rubygems