Files
openfoodnetwork/spec/models/subscription_line_item_spec.rb
Maikel Linke dcb6f4676d Remove all unnecessary spec_helper require statements
The `.rspec` file is doing this for us.
2026-01-21 12:35:34 +11:00

18 lines
425 B
Ruby

# frozen_string_literal: true
RSpec.describe SubscriptionLineItem, model: true do
describe "validations" do
it "requires a subscription" do
expect(subject).to belong_to :subscription
end
it "requires a variant" do
expect(subject).to belong_to :variant
end
it "requires a integer for quantity" do
expect(subject).to validate_numericality_of(:quantity).only_integer
end
end
end