spec move functionality into factory

This commit is contained in:
wvengen 2013-07-25 11:16:39 +02:00
parent b302cbde4f
commit 7dafcf714a
4 changed files with 22 additions and 12 deletions

View file

@ -2,8 +2,7 @@ require 'spec_helper'
describe GroupOrder do
let(:user) { FactoryGirl.create :user, groups: [FactoryGirl.create(:ordergroup)] }
let(:supplier) { FactoryGirl.create :supplier, article_count: true }
let(:order) { FactoryGirl.create(:order, supplier: supplier, article_ids: supplier.articles.map(&:id)).reload }
let(:order) { FactoryGirl.create :order }
# the following two tests are currently disabled - https://github.com/foodcoops/foodsoft/issues/158