On 11/04/2010 09:48 PM, Mohammed Morsi wrote:
> ---
> src/spec/models/template_spec.rb | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/src/spec/models/template_spec.rb
> b/src/spec/models/template_spec.rb
> index ef30fc1..2b8f7ea 100644
> --- a/src/spec/models/template_spec.rb
> +++ b/src/spec/models/template_spec.rb
> @@ -16,4 +16,12 @@ describe Template do
> rimg.save
> tpl.providers.size.should eql(1)
> end
> +
> + it "should not be valid if template name is too long" do
> + t = Factory.build(:template)
> + t.xml.name = ('a' * 256)
> + t.valid?.should be_false
> + t.errors[:name].should_not be_nil
> + t.errors[:name].should =~ /^is too long.*/
> + end
> end
ACK (both)
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel