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 | # Mayor.create(name: 'Emanuel', city: cities.first) |
| 8 | 8 | |
| 9 | 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 | 11 | default_user.save |
| 12 | 12 | |
| 13 | 13 | # The database should have only the default public | ... | ... |
spec/factories/users.rb
| ... | ... | @@ -2,13 +2,12 @@ |
| 2 | 2 | |
| 3 | 3 | FactoryGirl.define do |
| 4 | 4 | factory :user do |
| 5 | - id 1 | |
| 5 | + sequence(:id, 5) | |
| 6 | 6 | name "Diego Martinez" |
| 7 | 7 | email "diego@email.com" |
| 8 | 8 | password "password" |
| 9 | 9 | |
| 10 | 10 | factory :another_user do |
| 11 | - id 2 | |
| 12 | 11 | name "Heitor Reis" |
| 13 | 12 | email "hr@email.com" |
| 14 | 13 | password "password" | ... | ... |