Commit b73d182015bcd4b6cd21b7af1fe264579006552f
1 parent
cfc9280d
Exists in
master
and in
27 other branches
noosfero-steps: use provided email when creating user
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
features/step_definitions/noosfero_steps.rb
... | ... | @@ -4,7 +4,8 @@ Given /^the following users?$/ do |table| |
4 | 4 | person_data = item.dup |
5 | 5 | person_data.delete("login") |
6 | 6 | category = Category.find_by_slug person_data.delete("category") |
7 | - user = User.create!(:login => item[:login], :password => '123456', :password_confirmation => '123456', :email => item[:login] + "@example.com", :person_data => person_data) | |
7 | + email = item[:email] || item[:login] + "@example.com" | |
8 | + user = User.create!(:login => item[:login], :password => '123456', :password_confirmation => '123456', :email => email, :person_data => person_data) | |
8 | 9 | user.activate |
9 | 10 | p = user.person |
10 | 11 | p.categories << category if category | ... | ... |