Commit e7a51fb66eede9cd2078b4e3df13dbc7b6b26b3d
1 parent
204d9b7e
Exists in
colab
and in
4 other branches
Changed user factory to generate ids
Signed-off-by: Eduardo Silva <duduktamg@hotmail.com>
Showing
2 changed files
with
2 additions
and
3 deletions
Show diff stats
db/seeds.rb
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
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) | 10 | +default_user = FactoryGirl.create(:mezuro_user, id: nil) |
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 |
spec/factories/users.rb
@@ -2,13 +2,12 @@ | @@ -2,13 +2,12 @@ | ||
2 | 2 | ||
3 | FactoryGirl.define do | 3 | FactoryGirl.define do |
4 | factory :user do | 4 | factory :user do |
5 | - id 1 | 5 | + sequence(:id, 5) |
6 | name "Diego Martinez" | 6 | name "Diego Martinez" |
7 | email "diego@email.com" | 7 | email "diego@email.com" |
8 | password "password" | 8 | password "password" |
9 | 9 | ||
10 | factory :another_user do | 10 | factory :another_user do |
11 | - id 2 | ||
12 | name "Heitor Reis" | 11 | name "Heitor Reis" |
13 | email "hr@email.com" | 12 | email "hr@email.com" |
14 | password "password" | 13 | password "password" |