Files
openfoodnetwork/spec/lib/tasks/sample_data_rake_spec.rb
Maikel Linke 6d284023fe Configure rake specs in one place
So we don't have to add it to every rake spec file.
2025-09-22 17:27:58 +10:00

20 lines
432 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'sample_data.rake' do
before do
# Create seed data required by the sample data.
create(:user)
DefaultShippingCategory.find_or_create
end
it "creates some sample data to play with" do
invoke_task "ofn:sample_data"
expect(EnterpriseGroup.count).to eq 1
expect(Customer.count).to eq 2
expect(Spree::Order.count).to eq 5
end
end