Guest User

Untitled

a guest
Oct 21st, 2017
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. Scenario: Register new user
  2. Given I am an authenticated user with an admin role
  3. Given I am on the admin user's new page
  4. When I fill in "First name" with "name 1"
  5. And I fill in "Last name" with "man"
  6. And I fill in "Middle initial" with "m"
  7. And I fill in "Email" with "name1@example.com"
  8. And I fill in "Password" with "secretpass"
  9. And I fill in "Password confirmation" with "secretpass"
  10. Then show me the page
  11. And I press "Create"
  12. Then I should see "Name 1 M Man"
  13.  
  14. ##View
  15.  
  16.  
  17. .yui3-g
  18. .yui3-u-1
  19. %h2= t(:new_user)
  20. .yui3-g
  21. .yui3-u-1
  22. .gradient_border_wrap
  23. .gradient_border_content
  24. = form_for @user, :class => "new_user", :url => admin_users_path do |f|
  25. = f.label :first_name
  26. = f.text_field :first_name
  27. %br/
  28. = f.label :last_name
  29. = f.text_field :last_name
  30. %br/
  31. = f.label :middle_initial
  32. = f.text_field :middle_initial
  33. %br/
  34. = f.label :email
  35. = f.text_field :email
  36. %br/
  37. = f.label :password
  38. = f.password_field :password
  39. %br/
  40. = f.label :password_confirmation
  41. = f.password_field :password_confirmation
  42. %br/
  43. = f.submit t(:create), :class => 'add_new_button'
  44.  
  45. = link_to t(:cancel), admin_users_path, :class => 'cancel_button'
  46.  
  47. .clear
Add Comment
Please, Sign In to add comment