From ae049d523ec72e5e9d30224abb24d59055c680fe Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Tue, 8 Sep 2015 13:37:30 +0200 Subject: [PATCH] fix factories --- spec/factories/clients.rb | 3 +-- spec/factories/transactions.rb | 11 +++++------ spec/factories/users.rb | 6 +++++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/spec/factories/clients.rb b/spec/factories/clients.rb index 598d1c1..03b1cda 100644 --- a/spec/factories/clients.rb +++ b/spec/factories/clients.rb @@ -11,8 +11,7 @@ FactoryGirl.define do factory :client do - name "MyString" -key "MyString" + name {{ Faker::Lorem.word }} end end diff --git a/spec/factories/transactions.rb b/spec/factories/transactions.rb index 5273d51..0419338 100644 --- a/spec/factories/transactions.rb +++ b/spec/factories/transactions.rb @@ -14,11 +14,10 @@ FactoryGirl.define do factory :transaction do - debtor nil -creditor nil -amount 1 -origin "MyString" -message "MyString" + debtor + creditor + amount { rand(100) } + origin 'FactoryGirl' + message { Faker::Lorem.sentence } end - end diff --git a/spec/factories/users.rb b/spec/factories/users.rb index c1ad519..9366357 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -12,7 +12,11 @@ FactoryGirl.define do factory :user do - + name { Faker::Internet.user_name } + + factory :penning do + penning true + end end end