Sha256: 0810a2d32d8896b12012b6c0e340c891a01be920df179dde3a43af7c8674427e
Contents?: true
Size: 351 Bytes
Versions: 3
Compression:
Stored size: 351 Bytes
Contents
require 'rails_helper' module ShoppingCart RSpec.describe OrderItem, type: :model do context 'associations' do it { is_expected.to belong_to(:order) } it { is_expected.to belong_to(:product) } end context 'validations' do it { is_expected.to validate_numericality_of(:quantity).is_greater_than(0) } end end end
Version data entries
3 entries across 3 versions & 1 rubygems