Commit 204d9b7ec1015c484da1a4567984d84f40748f1c

Authored by Heitor
1 parent ea7f2e14

Moved password generation on default mezuro user to the users factory

Signed-off-by: Eduardo Silva <duduktamg@hotmail.com>
Showing 2 changed files with 3 additions and 2 deletions   Show diff stats
@@ -7,10 +7,10 @@ @@ -7,10 +7,10 @@
7 # Mayor.create(name: 'Emanuel', city: cities.first) 7 # Mayor.create(name: 'Emanuel', city: cities.first)
8 8
9 # Default mezuro user, the owner of the public kalibro configurations 9 # Default mezuro user, the owner of the public kalibro configurations
10 -default_user = FactoryGirl.create(:mezuro_user, password: Devise.friendly_token.first(10)) 10 +default_user = FactoryGirl.create(:mezuro_user)
11 default_user.save 11 default_user.save
12 12
13 -# The database should have only the default public 13 +# The database should have only the default public
14 # configurations when this file is executed 14 # configurations when this file is executed
15 kalibro_configurations = KalibroConfiguration.all 15 kalibro_configurations = KalibroConfiguration.all
16 kalibro_configurations.each do |configuration| 16 kalibro_configurations.each do |configuration|
spec/factories/users.rb
@@ -17,6 +17,7 @@ FactoryGirl.define do @@ -17,6 +17,7 @@ FactoryGirl.define do
17 factory :mezuro_user do 17 factory :mezuro_user do
18 name "Mezuro Default user" 18 name "Mezuro Default user"
19 email "mezuro@librelist.com" 19 email "mezuro@librelist.com"
  20 + password Devise.friendly_token.first(10)
20 end 21 end
21 end 22 end
22 end 23 end