From cbedd33db3e015acef0e2a2863b17cf7940d5ae6 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Sun, 18 Dec 2016 15:56:56 +0200 Subject: [PATCH] Add account and pricelist factories --- spec/factories/account.rb | 7 +++++++ spec/factories/pricelist.rb | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 spec/factories/account.rb create mode 100644 spec/factories/pricelist.rb diff --git a/spec/factories/account.rb b/spec/factories/account.rb new file mode 100644 index 000000000..19ed7f9c7 --- /dev/null +++ b/spec/factories/account.rb @@ -0,0 +1,7 @@ +FactoryGirl.define do + factory :account do + account_type Account::CASH + balance 1 + currency 'EUR' + end +end diff --git a/spec/factories/pricelist.rb b/spec/factories/pricelist.rb new file mode 100644 index 000000000..7d72d9c87 --- /dev/null +++ b/spec/factories/pricelist.rb @@ -0,0 +1,10 @@ +FactoryGirl.define do + factory :pricelist do + valid_from Time.zone.parse('05.07.2010') + valid_to Time.zone.parse('05.07.2010') + category 'com' + duration '1year' + operation_category 'create' + price 1.to_money + end +end