Sha256: ee51a9e1d51040e928e593ecaf958525291bc72ffaa7f1166449cdd444c832e7
Contents?: true
Size: 609 Bytes
Versions: 7
Compression:
Stored size: 609 Bytes
Contents
require "#{File.dirname(__FILE__)}/../test_helper" class VariationsTest < ActionController::IntegrationTest fixtures :categories, :variations, :products def test_var_save_with_cat c1 = categories(:pants) c2 = categories(:hats) v = variations(:s) c1.parent = c2 c1.save c1.reload assert_raise(ActiveRecord::RecordNotFound) {Variation.find(v.id)} end def test_var_save_with_product c = categories(:pants) p = products(:foo_shirt) v = variations(:l) p.category = c p.save assert_raise(ActiveRecord::RecordNotFound) {Variation.find(v.id)} end end
Version data entries
7 entries across 7 versions & 2 rubygems