migrate to Rails 4.0 (closes foodcoops#214)
Conflicts: Gemfile.lock
This commit is contained in:
parent
12d1221bfc
commit
7841245795
97 changed files with 659 additions and 557 deletions
|
|
@ -36,12 +36,12 @@ describe Article do
|
|||
end
|
||||
|
||||
it 'keeps a price history' do
|
||||
expect(article.article_prices.all.map(&:price)).to eq([article.price])
|
||||
expect(article.article_prices.map(&:price)).to eq([article.price])
|
||||
oldprice = article.price
|
||||
sleep 1 # so that the new price really has a later creation time
|
||||
article.price += 1
|
||||
article.save!
|
||||
expect(article.article_prices.all.map(&:price)).to eq([article.price, oldprice])
|
||||
expect(article.article_prices.reload.map(&:price)).to eq([article.price, oldprice])
|
||||
end
|
||||
|
||||
it 'is not in an open order by default' do
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ describe Order do
|
|||
it 'is not closed by default' do expect(order).to_not be_closed end
|
||||
|
||||
it 'has valid order articles' do
|
||||
order.order_articles.all.each {|oa| expect(oa).to be_valid }
|
||||
order.order_articles.each {|oa| expect(oa).to be_valid }
|
||||
end
|
||||
|
||||
it 'can be finished' do
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ describe Supplier do
|
|||
|
||||
it 'has valid articles' do
|
||||
supplier = create :supplier, article_count: true
|
||||
supplier.articles.all.each {|a| expect(a).to be_valid }
|
||||
supplier.articles.each {|a| expect(a).to be_valid }
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue