Add error on existing supplier name for current employee

This commit is contained in:
2015-02-24 18:18:55 +01:00
parent db72cd06aa
commit fd871639b9
3 changed files with 18 additions and 1 deletions
@@ -20,6 +20,10 @@ step "fill in the supplier signup form with a new supplier name" do
js_set_field '#new_supplier_supplier_name', 'Signup Supplier'
end
step "fill in the supplier signup form with an existing supplier name" do
js_set_field '#new_supplier_supplier_name', @supplier.name
end
step "click on the supplier signup submit button" do
find('[name="commit"]').click
end
@@ -59,3 +63,7 @@ step "the new signup supplier should be confirmed" do
@signup_supplier.reload
@signup_supplier.should be_confirmed
end
step "the new supplier signup for should have an error on :attribute" do |attribute|
page.should have_selector ".#{attribute}.error"
end