Advertisement
Guest User

Untitled

a guest
Aug 7th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. require 'rails_helper.rb'
  2. require 'spec_helper.rb'
  3.  
  4. feature "Register users:" do
  5. scenario "Register with trully input data" do
  6. # 10.times do |counter|
  7. email = (0...10).map { ('a'..'z').to_a[rand(25)] }.join
  8. email = "#{email}@gmail.com"
  9. name_of_user = (0...12).map { ('a'..'z').to_a[rand(25)] }.join.to_s
  10. digit_number = (0...6).map { (1..9).to_a[rand(9)] }.join.to_s
  11. password = (0...13).map { ('a'..'z').to_a[rand(9)] }.join.to_s
  12. #Wputs ("\n email = #{email_name} \n user = #{name_of_user} \n group id = #{digit_number} \n password = #{password} ")
  13. visit "/"
  14. click_link "Register"
  15. expect(page).to have_content("Sign up")
  16. fill_in 'user_email', with: "#{email}"
  17. #expect(page).to have_content("#{email}")
  18. fill_in 'User name', with: "#{name_of_user}"
  19. #expect(page).to have_content("#{name_of_user}")
  20. fill_in 'Number of group', with: "#{digit_number}"
  21. fill_in "Password", with: "#{password}", match: :first
  22. fill_in 'Password confirmation', with: "#{password}"
  23.  
  24. save_and_open_page
  25. #click_button "Sign up"
  26.  
  27. #expect(page).to have_content("Instructions here.")
  28. #click_link "Logout"
  29. #expect(page).to have_content("Log in")
  30. # end
  31. end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement