admin true end trait :deactivated do deactivated_at { 1.day.ago } end factory :admin_user, traits: %i(admin) factory :admin_deactivated_user, traits: %i(admin deactivated) end end
create(:user) } let(:product_1) { create(:product) } let(:product_2) { create(:product) } context 'user_1 orders product_1' do ... end context 'user_2 orders many products' do ... end end