mas-rad_core 0.0.68 → 0.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/firm.rb +4 -0
- data/db/migrate/20150817141257_add_status_to_firms.rb +5 -0
- data/lib/mas/rad_core/version.rb +1 -1
- data/spec/dummy/db/schema.rb +2 -1
- data/spec/dummy/log/test.log +152951 -0
- data/spec/factories/firm.rb +1 -0
- data/spec/models/firm_spec.rb +26 -0
- metadata +3 -2
data/spec/factories/firm.rb
CHANGED
@@ -28,6 +28,7 @@ FactoryGirl.define do
|
|
28
28
|
wills_and_probate_flag true
|
29
29
|
latitude { Faker::Address.latitude.to_f.round(6) }
|
30
30
|
longitude { Faker::Address.longitude.to_f.round(6) }
|
31
|
+
status :independent
|
31
32
|
|
32
33
|
factory :firm_with_remote_advice do
|
33
34
|
other_advice_methods { create_list(:other_advice_method, rand(1..3)) }
|
data/spec/models/firm_spec.rb
CHANGED
@@ -329,6 +329,32 @@ RSpec.describe Firm do
|
|
329
329
|
it { is_expected.not_to be_valid }
|
330
330
|
end
|
331
331
|
end
|
332
|
+
|
333
|
+
describe 'status' do
|
334
|
+
context 'without a status' do
|
335
|
+
it 'is not valid' do
|
336
|
+
expect(build(:firm, status: nil)).to_not be_valid
|
337
|
+
end
|
338
|
+
end
|
339
|
+
|
340
|
+
context 'with a garbage status' do
|
341
|
+
it 'throws an exception' do
|
342
|
+
expect { build(:firm, status: :horse) }.to raise_error
|
343
|
+
end
|
344
|
+
end
|
345
|
+
|
346
|
+
context 'with status "independent"' do
|
347
|
+
it 'is valid' do
|
348
|
+
expect(build(:firm, status: :independent)).to be_valid
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
context 'with status "restricted"' do
|
353
|
+
it 'is valid' do
|
354
|
+
expect(build(:firm, status: :restricted)).to be_valid
|
355
|
+
end
|
356
|
+
end
|
357
|
+
end
|
332
358
|
end
|
333
359
|
|
334
360
|
describe '#full_street_address' 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.69
|
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-08-
|
11
|
+
date: 2015-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -288,6 +288,7 @@ files:
|
|
288
288
|
- db/migrate/20150806143047_add_investing_checkboxes_to_firms.rb
|
289
289
|
- db/migrate/20150812140642_create_offices.rb
|
290
290
|
- db/migrate/20150813103046_remove_confirmed_disclaimer_from_advisers.rb
|
291
|
+
- db/migrate/20150817141257_add_status_to_firms.rb
|
291
292
|
- lib/mas/elastic_search_client.rb
|
292
293
|
- lib/mas/firm_repository.rb
|
293
294
|
- lib/mas/firm_result.rb
|