Secure product_categories and add example test for other supplier resources and fix hack attempts included in test

This commit is contained in:
2012-12-06 12:21:38 +01:00
parent 382f91b1d6
commit 180b6deb4d
8 changed files with 207 additions and 8 deletions
@@ -0,0 +1,21 @@
require 'acceptance/acceptance_helper'
feature 'Supplier product categories spec', %q{
In order to manage product categories
As a supplier
I want to have control over product categories and associated products
} do
background do
create_supplier 'supplier@qwaiter.com'
end
context "GET #index" do
background do
@product_category = create :product_category, supplier: @supplier
end
scenario "I can see a drag handle having class .handle for sorting the product categories" do
login_supplier_as 'supplier@qwaiter.com'
visit '/supplier/product_categories'
page.should have_selector '.handle'
end
end
end
@@ -1,6 +1,5 @@
require 'acceptance/acceptance_helper'
@javascript
feature 'Supplier main board spec.rb', %q{
In order to manage active list and orders
As a supplier