End of day commit

This commit is contained in:
2015-02-18 22:36:47 +01:00
parent 82670f271b
commit c1858455e9
68 changed files with 633 additions and 145 deletions
+8 -8
View File
@@ -1,13 +1,13 @@
module Features
module BasicHelpers
module BasicHelpers
# Put helper methods you need to be available in all acceptance specs here.
def create_user(email, password='secret')
@user = User.find_by_email(email) || FactoryGirl.create(:user, email: email, password: password)
end
def create_supplier(email, password='secret')
@supplier = Supplier.find_by_email(email) || FactoryGirl.create(:supplier, email: email, password: password)
end
#def create_supplier(email, password='secret')
#@supplier = Supplier.find_by_email(email) || FactoryGirl.create(:supplier, email: email, password: password)
#end
def create_confirmed_supplier(email, password='secret')
@supplier = Supplier.find_by_email(email) || FactoryGirl.create(:supplier, :confirmed, email: email, password: password)
@@ -21,10 +21,10 @@ module Features
submit_form
end
def login_supplier_as(email)
visit "/suppliers/sign_in"
fill_in "supplier_email", with: email
fill_in "supplier_password", with: "secret"
def login_employee_as(email)
visit "/employees/sign_in"
fill_in "employee_email", with: email
fill_in "employee_password", with: "secret"
submit_form
end