Sha256: 7d44153c6934b9400ba1a758c872f535efd7585a08c1800a5fa6827ac3e77a68
Contents?: true
Size: 764 Bytes
Versions: 1
Compression:
Stored size: 764 Bytes
Contents
describe Role do it "should require a name" do expect(subject).not_to be_valid subject.name = 'foo' expect(subject).to be_valid end it "should not allow space in the name" do subject.name = 'foo bar' expect(subject).not_to be_valid end it "should not allow comma in the name" do subject.name = 'foo,bar' expect(subject).not_to be_valid end it "should not allow ampersand in the name" do subject.name = 'foo&bar' expect(subject).not_to be_valid end it "should not allow less-than in the name" do subject.name = 'foo<bar' expect(subject).not_to be_valid end it "should validate uniqueness" do subject.name ='foo' subject.save! expect(Role.new(name: 'foo')).not_to be_valid end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hydra-role-management-1.0.0 | spec/models/role_spec.rb |