Add features
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
Given(/^there is an active list$/) do
|
||||
create_confirmed_supplier 'supplier@qwaiter.com'
|
||||
create_user 'user@qwaiter.com'
|
||||
@table = FactoryGirl.create :table, supplier: @supplier
|
||||
@list = FactoryGirl.create :list, supplier: @supplier, table: @table, user_ids: [@user.id]
|
||||
end
|
||||
|
||||
Given(/^I am on the main board$/) do
|
||||
visit '/supplier'
|
||||
sleep 0.1
|
||||
end
|
||||
|
||||
And(/^I am signed in$/) do
|
||||
login_supplier_as 'supplier@qwaiter.com'
|
||||
end
|
||||
|
||||
And(/^an order is placed$/) do
|
||||
product = FactoryGirl.create :product, supplier: @supplier
|
||||
sleep 0.1
|
||||
@list.place_order @user, {product.id => 369}
|
||||
end
|
||||
Then(/^there is a list record for the active list$/) do
|
||||
page.should have_selector "#list-row-#{@list.id}"
|
||||
end
|
||||
|
||||
Then(/^there should be a record of the active order$/) do
|
||||
page.should have_selector ".of-list-#{@list.id}"
|
||||
end
|
||||
Reference in New Issue
Block a user