mas-rad_core 0.0.88 → 0.0.89
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/firm.rb +1 -1
- data/db/migrate/20151102113518_add_default_value_to_minimum_fixed_fee.rb +15 -0
- data/lib/mas/rad_core/version.rb +1 -1
- data/spec/dummy/config/database.yml +2 -1
- data/spec/dummy/db/schema.rb +2 -2
- data/spec/dummy/log/development.log +49047 -75211
- data/spec/dummy/log/test.log +0 -0
- data/spec/factories/firm.rb +0 -1
- data/spec/models/firm_spec.rb +28 -0
- metadata +4 -3
data/spec/dummy/log/test.log
CHANGED
Binary file
|
data/spec/factories/firm.rb
CHANGED
@@ -8,7 +8,6 @@ FactoryGirl.define do
|
|
8
8
|
in_person_advice_methods { create_list(:in_person_advice_method, rand(1..3)) }
|
9
9
|
free_initial_meeting { [true, false].sample }
|
10
10
|
initial_meeting_duration { create(:initial_meeting_duration) }
|
11
|
-
minimum_fixed_fee { Faker::Number.number(4) }
|
12
11
|
initial_advice_fee_structures { create_list(:initial_advice_fee_structure, rand(1..3)) }
|
13
12
|
ongoing_advice_fee_structures { create_list(:ongoing_advice_fee_structure, rand(1..3)) }
|
14
13
|
allowed_payment_methods { create_list(:allowed_payment_method, rand(1..3)) }
|
data/spec/models/firm_spec.rb
CHANGED
@@ -324,11 +324,39 @@ RSpec.describe Firm do
|
|
324
324
|
end
|
325
325
|
|
326
326
|
describe 'minimum fixed fee' do
|
327
|
+
context 'default value' do
|
328
|
+
it { expect(Firm.new.minimum_fixed_fee).to eq(0) }
|
329
|
+
end
|
330
|
+
|
327
331
|
context 'when not numeric' do
|
328
332
|
before { firm.minimum_fixed_fee = 'not-numeric' }
|
329
333
|
|
330
334
|
it { is_expected.not_to be_valid }
|
331
335
|
end
|
336
|
+
|
337
|
+
context 'when blank' do
|
338
|
+
before { firm.minimum_fixed_fee = nil }
|
339
|
+
|
340
|
+
it { is_expected.not_to be_valid }
|
341
|
+
end
|
342
|
+
|
343
|
+
context 'when less than zero' do
|
344
|
+
before { firm.minimum_fixed_fee = -1 }
|
345
|
+
|
346
|
+
it { is_expected.to be_invalid }
|
347
|
+
end
|
348
|
+
|
349
|
+
context 'when zero' do
|
350
|
+
before { firm.minimum_fixed_fee = 0 }
|
351
|
+
|
352
|
+
it { is_expected.to be_valid }
|
353
|
+
end
|
354
|
+
|
355
|
+
context 'when more than zero' do
|
356
|
+
before { firm.minimum_fixed_fee = 1 }
|
357
|
+
|
358
|
+
it { is_expected.to be_valid }
|
359
|
+
end
|
332
360
|
end
|
333
361
|
|
334
362
|
describe 'investment size' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mas-rad_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.89
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Lovell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -307,6 +307,7 @@ files:
|
|
307
307
|
- db/migrate/20150817141257_add_status_to_firms.rb
|
308
308
|
- db/migrate/20150825090822_move_firm_address_to_office.rb
|
309
309
|
- db/migrate/20150930140851_remove_firm_email_and_phone.rb
|
310
|
+
- db/migrate/20151102113518_add_default_value_to_minimum_fixed_fee.rb
|
310
311
|
- lib/mas/adviser_result.rb
|
311
312
|
- lib/mas/elastic_search_client.rb
|
312
313
|
- lib/mas/firm_repository.rb
|
@@ -444,7 +445,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
444
445
|
version: '0'
|
445
446
|
requirements: []
|
446
447
|
rubyforge_project:
|
447
|
-
rubygems_version: 2.4.
|
448
|
+
rubygems_version: 2.4.7
|
448
449
|
signing_key:
|
449
450
|
specification_version: 4
|
450
451
|
summary: MAS RAD Core.
|