Cleanup for mobile build without errors
This commit is contained in:
@@ -29,9 +29,9 @@ describe List do
|
||||
list.paid_at.should be_kind_of Time
|
||||
end
|
||||
it "should set is_paid to true" do
|
||||
list.is_paid.should be_false
|
||||
list.is_paid.should be false
|
||||
list.is_paid!
|
||||
list.is_paid.should be_true
|
||||
list.is_paid.should be true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -66,31 +66,31 @@ describe List do
|
||||
end
|
||||
|
||||
describe '#has_active_orders?' do
|
||||
its(:has_active_orders?) { should be_false }
|
||||
its(:has_active_orders?) { should be false }
|
||||
|
||||
it 'returns true when there are placed orders for the list' do
|
||||
create :order, supplier: supplier, list: list, section: section, state: 'placed'
|
||||
list.has_active_orders?.should be_true
|
||||
list.has_active_orders?.should be true
|
||||
end
|
||||
|
||||
it 'returns true when there are active orders for the list' do
|
||||
create :order, supplier: supplier, list: list, section: section, state: 'active'
|
||||
list.has_active_orders?.should be_true
|
||||
list.has_active_orders?.should be true
|
||||
end
|
||||
|
||||
it 'returns false when there are only delivered orders' do
|
||||
create :order, supplier: supplier, list: list, section: section, state: 'delivered'
|
||||
list.has_active_orders?.should be_false
|
||||
list.has_active_orders?.should be false
|
||||
end
|
||||
|
||||
it 'returns false when there are only closed orders' do
|
||||
create :order, supplier: supplier, list: list, section: section, state: 'closed'
|
||||
list.has_active_orders?.should be_false
|
||||
list.has_active_orders?.should be false
|
||||
end
|
||||
|
||||
it 'returns false when there are only cancelled orders' do
|
||||
create :order, supplier: supplier, list: list, section: section, state: 'cancelled'
|
||||
list.has_active_orders?.should be_false
|
||||
list.has_active_orders?.should be false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ describe Order do
|
||||
let(:order) {create :order, supplier: supplier, list: list, state: 'placed' }
|
||||
subject { order }
|
||||
|
||||
its(:placed?) { should be_true }
|
||||
its(:active?) { should be_false }
|
||||
its(:placed?) { should be true }
|
||||
its(:active?) { should be false }
|
||||
|
||||
describe 'count_active_for_supplier_and_list' do
|
||||
before { order }
|
||||
|
||||
@@ -10,7 +10,7 @@ describe Product do
|
||||
pc2 = create :product_category, supplier: supplier
|
||||
|
||||
product = build :product, supplier: supplier, product_category_ids: [pc1.id]
|
||||
product.save.should be_true
|
||||
product.save.should be true
|
||||
product.reload
|
||||
pc1.reload
|
||||
pc2.reload
|
||||
|
||||
Reference in New Issue
Block a user