fix a failing spec for context model

This commit is contained in:
Simon Rozet 2008-06-23 09:56:18 +02:00
parent eb53865ff9
commit 60b986a5b9

View file

@ -30,9 +30,8 @@ describe "Context validations" do
it "should have two errors with a missing name" do
@context.attributes = valid_context_attributes.except(:name)
@context.should_not be_valid
@context.should have(2).error_on(:name)
@context.errors.on(:name)[0].should eql("context must have a name")
@context.errors.on(:name)[1].should eql("context name must be less than 256 characters")
@context.should have(1).error_on(:name)
@context.error_on(:name).should include('context must have a name')
end
it "should have one error with a name of more than 255 characters" do