Add error on existing supplier name for current employee
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user