mas-rad_core 0.0.62 → 0.0.63

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,6 @@ FactoryGirl.define do
27
27
  equity_release_flag true
28
28
  inheritance_tax_and_estate_planning_flag true
29
29
  wills_and_probate_flag true
30
- other_flag true
31
30
  latitude { Faker::Address.latitude.to_f.round(6) }
32
31
  longitude { Faker::Address.longitude.to_f.round(6) }
33
32
 
@@ -44,7 +43,6 @@ FactoryGirl.define do
44
43
  equity_release_flag false
45
44
  inheritance_tax_and_estate_planning_flag false
46
45
  wills_and_probate_flag false
47
- other_flag false
48
46
  end
49
47
 
50
48
  factory :firm_with_advisers do
@@ -214,6 +214,18 @@ RSpec.describe Firm do
214
214
  it { is_expected.not_to be_valid }
215
215
  end
216
216
  end
217
+
218
+ describe 'advice types' do
219
+ context 'when none assigned' do
220
+ before do
221
+ Firm::ADVICE_TYPES_ATTRIBUTES.each do |attribute|
222
+ firm[attribute] = false
223
+ end
224
+ end
225
+
226
+ it { is_expected.not_to be_valid }
227
+ end
228
+ end
217
229
  end
218
230
 
219
231
  describe '#full_street_address' do
@@ -341,4 +353,17 @@ RSpec.describe Firm do
341
353
  expect(Firm.sorted_by_registered_name.map(&:registered_name)).to eq(sorted_names)
342
354
  end
343
355
  end
356
+
357
+ describe '#advice_types' do
358
+ it 'returns a hash of advice types' do
359
+ expect(subject.advice_types).to eq({
360
+ retirement_income_products_flag: subject.retirement_income_products_flag,
361
+ pension_transfer_flag: subject.pension_transfer_flag,
362
+ long_term_care_flag: subject.long_term_care_flag,
363
+ equity_release_flag: subject.equity_release_flag,
364
+ inheritance_tax_and_estate_planning_flag: subject.inheritance_tax_and_estate_planning_flag,
365
+ wills_and_probate_flag: subject.wills_and_probate_flag
366
+ })
367
+ end
368
+ end
344
369
  end
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.62
4
+ version: 0.0.63
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-07-07 00:00:00.000000000 Z
11
+ date: 2015-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -283,6 +283,7 @@ files:
283
283
  - db/migrate/20150423154732_add_index_on_lookup_advisers_reference_number.rb
284
284
  - db/migrate/20150630143001_change_percentage_fields_to_boolean_fields_on_firm.rb
285
285
  - db/migrate/20150706102943_move_website_from_principals_to_firms.rb
286
+ - db/migrate/20150716123032_remove_other_flag_from_firms.rb
286
287
  - lib/mas/elastic_search_client.rb
287
288
  - lib/mas/firm_repository.rb
288
289
  - lib/mas/firm_result.rb