Sha256: d8af01f8781739bc2547554132ee499e6f86dd5ad5d5e00d884bc2f21bfc88da
Contents?: true
Size: 773 Bytes
Versions: 1
Compression:
Stored size: 773 Bytes
Contents
require 'spec_helper' describe Institution do it "should require a name" do subject.should_not be_valid subject.name = 'foo' subject.should be_valid end it "should not allow space in the name" do subject.name = 'foo bar' subject.should_not be_valid end it "should not allow comma in the name" do subject.name = 'foo,bar' subject.should_not be_valid end it "should not allow ampersand in the name" do subject.name = 'foo&bar' subject.should_not be_valid end it "should not allow less-than in the name" do subject.name = 'foo<bar' subject.should_not be_valid end it "should validate uniqueness" do subject.name ='foo' subject.save! Institution.new(name: 'foo').should_not be_valid end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bpl-institution-management-0.0.2 | spec/models/institution_spec.rb |