Skip to content

Commit 3c437e5

Browse files
committed
chore: lint fix - mostly whitespace only
1 parent 941e9a1 commit 3c437e5

2 files changed

Lines changed: 26 additions & 7 deletions

File tree

spec/services/species/trade_name_prefix_matcher_spec.rb

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,31 @@
44
@accepted_name = create_cites_eu_genus(
55
taxon_name: create(:taxon_name, scientific_name: 'Pavona')
66
)
7+
78
@trade_name = create_cites_eu_species(
89
taxon_name: create(:taxon_name, scientific_name: 'Pavona minor'),
910
name_status: 'T'
1011
)
12+
1113
@status_N_species = create_cites_eu_species(
1214
taxon_name: create(:taxon_name, scientific_name: 'Paradisaea'),
1315
parent: create_cites_eu_genus(
1416
taxon_name: create(:taxon_name, scientific_name: 'Vidua')
1517
),
1618
name_status: 'N'
1719
)
20+
1821
create(
1922
:taxon_relationship,
2023
taxon_concept: @accepted_name,
2124
other_taxon_concept: @trade_name,
2225
taxon_relationship_type: trade_name_relationship_type
2326
)
27+
2428
create_cites_I_addition(taxon_concept: @accepted_name)
29+
2530
SapiModule::StoredProcedures.rebuild_cites_taxonomy_and_listings
31+
2632
@accepted_name_ac = MAutoCompleteTaxonConcept.find(@accepted_name.id)
2733
@trade_name_ac = MAutoCompleteTaxonConcept.find(@trade_name.id)
2834
@status_N_species_ac = MAutoCompleteTaxonConcept.find(@status_N_species.id)
@@ -42,9 +48,9 @@
4248
end
4349

4450
specify { expect(subject.results).to include(@status_N_species_ac) }
45-
end
51+
end
4652

47-
context 'when trade internal visibility' do
53+
context 'when trade internal visibility' do
4854
subject do
4955
Species::TaxonConceptPrefixMatcher.new(
5056
{
@@ -56,9 +62,9 @@
5662
end
5763

5864
specify { expect(subject.results).to include(@status_N_species_ac) }
59-
end
65+
end
6066

61-
context 'when speciesplus visibility' do
67+
context 'when speciesplus visibility' do
6268
subject do
6369
Species::TaxonConceptPrefixMatcher.new(
6470
{

spec/services/taxon_concept_prefix_matcher_spec.rb

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
taxon_name: create(:taxon_name, scientific_name: 'Aaa')
99
)
1010
end
11+
1112
let!(:taxon_concept2) do
1213
create_cites_eu_family(
1314
taxon_name: create(:taxon_name, scientific_name: 'Aac'),
1415
parent: taxon_concept1
1516
)
1617
end
18+
1719
let!(:taxon_concept3) do
1820
create_cites_eu_subfamily(
1921
taxon_name: create(:taxon_name, scientific_name: 'Aab'),
@@ -32,23 +34,28 @@
3234
parent: taxon_concept3
3335
)
3436
end
37+
3538
let!(:hybrid) do
36-
tmp = create_cites_eu_genus(
39+
hybrid_genus = create_cites_eu_genus(
3740
taxon_name: create(:taxon_name, scientific_name: 'Abc'),
3841
name_status: 'H'
3942
)
43+
4044
create(
4145
:taxon_relationship,
4246
taxon_concept: taxon_concept4,
43-
other_taxon_concept: tmp,
47+
other_taxon_concept: hybrid_genus,
4448
taxon_relationship_type: hybrid_relationship_type
4549
)
46-
tmp
50+
51+
hybrid_genus
4752
end
53+
4854
context 'when name status not specified' do
4955
let(:matcher_params) do
5056
SearchParams.new(taxonomy: { id: taxonomy.id }, scientific_name: 'Ab')
5157
end
58+
5259
let(:matcher) { TaxonConceptPrefixMatcher.new matcher_params }
5360
specify { expect(matcher.taxon_concepts).to include(taxon_concept4) }
5461
specify { expect(matcher.taxon_concepts).not_to include(hybrid) }
@@ -58,7 +65,9 @@
5865
let(:matcher_params) do
5966
SearchParams.new(taxonomy: { id: taxonomy.id }, scientific_name: 'Ab', name_status: 'H')
6067
end
68+
6169
let(:matcher) { TaxonConceptPrefixMatcher.new matcher_params }
70+
6271
specify { expect(matcher.taxon_concepts).not_to include(taxon_concept4) }
6372
specify { expect(matcher.taxon_concepts).to include(hybrid) }
6473
end
@@ -71,6 +80,7 @@
7180
scientific_name: 'A'
7281
)
7382
end
83+
7484
let(:parent_matcher) do
7585
TaxonConceptPrefixMatcher.new parent_matcher_params
7686
end
@@ -88,6 +98,7 @@
8898
scientific_name: 'AAA'
8999
)
90100
end
101+
91102
let(:ancestor_matcher) do
92103
TaxonConceptPrefixMatcher.new ancestor_matcher_params
93104
end
@@ -105,6 +116,7 @@
105116
scientific_name: 'AAA'
106117
)
107118
end
119+
108120
let(:self_and_ancestor_matcher) do
109121
TaxonConceptPrefixMatcher.new self_and_ancestor_matcher_params
110122
end
@@ -140,6 +152,7 @@
140152
scientific_name: 'A'
141153
)
142154
end
155+
143156
let(:descendant_matcher) do
144157
TaxonConceptPrefixMatcher.new descendant_matcher_params
145158
end

0 commit comments

Comments
 (0)