23 lines
644 B
Ruby
23 lines
644 B
Ruby
step 'there is a table' do
|
|
step 'there is a section'
|
|
@table ||= create :table, section: @section, supplier: @supplier
|
|
end
|
|
|
|
step 'there is a table in the section' do
|
|
step 'there is a table'
|
|
end
|
|
|
|
step "the other user sees the table menu" do
|
|
Capybara.session_name = :other_user
|
|
route_should_be 'user#list_products_for_table'
|
|
find('.table-number').text.should == @table.number.to_s
|
|
end
|
|
|
|
step "the other user does not see order buttons" do
|
|
page.should_not have_selector '.order-product-button'
|
|
end
|
|
|
|
step "there is another table in the section" do
|
|
@other_table = create :table, number: 126, section: @section, supplier: @supplier
|
|
end
|