Sha256: ea5f1e20f47a84f6e34605f9647a9d2a8361f14b78d6f79b2d90fbc3835d5f59
Contents?: true
Size: 526 Bytes
Versions: 2
Compression:
Stored size: 526 Bytes
Contents
require "spec_helper" describe "Rating" do before(:each) do @rating = Rating.new() user = Factory(:user) product = Factory(:product) @attr = { :value => 3, :user_id => user.id, :product_id => product.id } end it "should create a rating with valid attributes" do success = Rating.new(@attr) success.should be_valid end it "should not create a rating when value is empty" do novalue = Rating.new(@attr.merge(:value => "")) novalue.should_not be_valid end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree_suppliers-0.0.1 | spec/models/rating_spec.rb |
spree_suppliers-0.60.3 | spec/models/rating_spec.rb |