stability improvement

This commit is contained in:
2014-07-28 17:33:40 +02:00
parent 48e1850200
commit 7443d3b08b
12 changed files with 67 additions and 14 deletions
+4 -3
View File
@@ -61,15 +61,15 @@ describe List do
end
it "changes the table" do
expect{ list.move_to_table! new_table }.to change{ list.table_id }.to( new_table.id )
expect{ list.move_to_table! new_table }.to change{ list.table_id }.to( new_table.id )
end
it "changes the section" do
expect{ list.move_to_table! new_table }.to change{ list.section_id }.to( new_section.id )
expect{ list.move_to_table! new_table }.to change{ list.section_id }.to( new_section.id )
end
it "changes the section of the orders" do
expect{ list.move_to_table! new_table }.to change{ @order1.reload; @order1.section_id }.to( new_section.id )
expect{ list.move_to_table! new_table }.to change{ @order1.reload; @order1.section_id }.to( new_section.id )
end
end
@@ -142,6 +142,7 @@ describe List do
describe 'broadcasting' do
it 'broadcasts to the user and the supplier the active order counter' do
# create existing order
list.place_order(products: {product.id => 7}, user: user)
expect{
+1 -1
View File
@@ -24,7 +24,7 @@ describe Supplier do
Qwaiter::Counter.set "supplier_counter:#{supplier.id}:orders_placed", 9
supplier.orders_placed_count.should == 9
Supplier.reset_counters!
sleep 0.5
sleep 1
supplier.orders_placed_count.should == 0
Qwaiter::Counter.connection = old_connection
end