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

Version Path
card-1.100.0 mod/account/spec/set/right/roles_spec.rb
card-1.99.6 mod/account/spec/set/right/roles_spec.rb
card-1.99.5 mod/account/spec/set/right/roles_spec.rb
card-1.99.4 mod/account/spec/set/right/roles_spec.rb
card-1.99.3 mod/account/spec/set/right/roles_spec.rb
card-1.99.2 mod/account/spec/set/right/roles_spec.rb
card-1.99.1 mod/account/spec/set/right/roles_spec.rb
card-1.99.0 mod/account/spec/set/right/roles_spec.rb
card-1.98.3 mod/account/spec/set/right/roles_spec.rb
card-1.98.2 mod/account/spec/set/right/roles_spec.rb
card-1.98.1 mod/account/spec/set/right/roles_spec.rb
card-1.98.0 mod/account/spec/set/right/roles_spec.rb