Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scenario: Register new user
- Given I am an authenticated user with an admin role
- Given I am on the admin user's new page
- When I fill in "First name" with "name 1"
- And I fill in "Last name" with "man"
- And I fill in "Middle initial" with "m"
- And I fill in "Email" with "name1@example.com"
- And I fill in "Password" with "secretpass"
- And I fill in "Password confirmation" with "secretpass"
- Then show me the page
- And I press "Create"
- Then I should see "Name 1 M Man"
- ##View
- .yui3-g
- .yui3-u-1
- %h2= t(:new_user)
- .yui3-g
- .yui3-u-1
- .gradient_border_wrap
- .gradient_border_content
- = form_for @user, :class => "new_user", :url => admin_users_path do |f|
- = f.label :first_name
- = f.text_field :first_name
- %br/
- = f.label :last_name
- = f.text_field :last_name
- %br/
- = f.label :middle_initial
- = f.text_field :middle_initial
- %br/
- = f.label :email
- = f.text_field :email
- %br/
- = f.label :password
- = f.password_field :password
- %br/
- = f.label :password_confirmation
- = f.password_field :password_confirmation
- %br/
- = f.submit t(:create), :class => 'add_new_button'
- = link_to t(:cancel), admin_users_path, :class => 'cancel_button'
- .clear
Add Comment
Please, Sign In to add comment