# frozen_string_literal: true require 'rails_helper' RSpec.describe Product, type: :model do it { should validate_presence_of(:name) } it { should validate_presence_of(:unitary_price) } it { should validate_presence_of(:bulk_price) } it { should validate_presence_of(:available_quantity) } it { should have_one_attached(:picture) } it { should belong_to(:company) } it { should serialize(:categories) } end