Skip to content

Commit acde61d

Browse files
committed
Remove obsolete references to structured adresses
1 parent 32261ed commit acde61d

File tree

4 files changed

+3
-39
lines changed

4 files changed

+3
-39
lines changed

app/domain/export/tabular/people/participation_nds_row.rb

+2-17
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,11 @@ def second_language
7777
end
7878

7979
def street
80-
if FeatureGate.enabled?("structured_addresses")
81-
entry.street
82-
else
83-
split_address[1]
84-
end
80+
entry.street
8581
end
8682

8783
def housenumber
88-
if FeatureGate.enabled?("structured_addresses")
89-
entry.housenumber
90-
else
91-
split_address[2]
92-
end
84+
entry.housenumber
9385
end
9486

9587
def peid
@@ -109,12 +101,5 @@ def phone_number(label)
109101
def additional_email(label)
110102
entry.additional_emails.find_by(label: label).try(:email)
111103
end
112-
113-
def split_address
114-
FeatureGate.refute!("structured_addresses")
115-
116-
entry.address&.match(Address::FullTextSearch::ADDRESS_WITH_NUMBER_REGEX)&.to_a ||
117-
[entry.address]
118-
end
119104
end
120105
end

spec/features/event_register_managed_spec.rb

-12
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232

3333
context 'with feature toggle disabled' do
3434
before do
35-
allow(FeatureGate).to receive(:enabled?).with('structured_addresses').and_return(true)
36-
allow(FeatureGate).to receive(:enabled?).with('address_migration').and_return(false)
3735
allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false)
3836
allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(false)
3937
allow(FeatureGate).to receive(:enabled?).with('people.people_managers.self_service_managed_creation').and_return(false)
@@ -50,8 +48,6 @@
5048

5149
context 'with people_managers feature toggle enabled' do
5250
before do
53-
allow(FeatureGate).to receive(:enabled?).with('structured_addresses').and_return(true)
54-
allow(FeatureGate).to receive(:enabled?).with('address_migration').and_return(false)
5551
allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false)
5652
allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(true)
5753
allow(FeatureGate).to receive(:enabled?).with('people.people_managers.self_service_managed_creation').and_return(false)
@@ -145,8 +141,6 @@
145141

146142
context 'with feature toggle disabled' do
147143
before do
148-
allow(FeatureGate).to receive(:enabled?).with('structured_addresses').and_return(true)
149-
allow(FeatureGate).to receive(:enabled?).with('address_migration').and_return(false)
150144
allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false)
151145
allow(FeatureGate).to receive(:enabled?).with('people.people_managers.self_service_managed_creation').and_return(true)
152146
allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(false)
@@ -161,8 +155,6 @@
161155

162156
context 'with feature toggle enabled' do
163157
before do
164-
allow(FeatureGate).to receive(:enabled?).with('structured_addresses').and_return(true)
165-
allow(FeatureGate).to receive(:enabled?).with('address_migration').and_return(false)
166158
allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false)
167159
allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(true)
168160
allow(FeatureGate).to receive(:enabled?).with('people.people_managers.self_service_managed_creation').and_return(true)
@@ -204,8 +196,6 @@
204196
describe 'registering new managed' do
205197
context 'with people_managers feature toggle disabled' do
206198
before do
207-
allow(FeatureGate).to receive(:enabled?).with('structured_addresses').and_return(true)
208-
allow(FeatureGate).to receive(:enabled?).with('address_migration').and_return(false)
209199
allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false)
210200
allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(false)
211201
end
@@ -241,8 +231,6 @@
241231

242232
context 'with people_managers feature toggle enabled' do
243233
before do
244-
allow(FeatureGate).to receive(:enabled?).with('structured_addresses').and_return(true)
245-
allow(FeatureGate).to receive(:enabled?).with('address_migration').and_return(false)
246234
allow(FeatureGate).to receive(:enabled?).with(:self_registration_reason).and_return(false)
247235
allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(true)
248236
end

spec/features/external_event_register_manager_spec.rb

-8
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
allow(FeatureGate).to receive(:enabled?).with('groups.self_registration').and_return(false)
2323
allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(false)
2424
allow(FeatureGate).to receive(:enabled?).with('people.people_managers.self_service_managed_creation').and_return(true)
25-
allow(FeatureGate).to receive(:enabled?).with('structured_addresses').and_return(true)
26-
allow(FeatureGate).to receive(:enabled?).with('address_migration').and_return(false)
2725
allow_any_instance_of(FeatureGate).to receive(:enabled?).and_return(false)
2826
end
2927

@@ -58,15 +56,11 @@
5856
allow(FeatureGate).to receive(:enabled?).with('groups.self_registration').and_return(false)
5957
allow(FeatureGate).to receive(:enabled?).with('people.people_managers').and_return(true)
6058
allow(FeatureGate).to receive(:enabled?).with('people.people_managers.self_service_managed_creation').and_return(true)
61-
allow(FeatureGate).to receive(:enabled?).with('structured_addresses').and_return(true)
62-
allow(FeatureGate).to receive(:enabled?).with('address_migration').and_return(false)
6359
allow_any_instance_of(FeatureGate).to receive(:enabled?).and_return(true)
6460
end
6561

6662
context 'with self_service_managed_creation feature toggle disabled' do
6763
before do
68-
allow(FeatureGate).to receive(:enabled?).with('structured_addresses').and_return(true)
69-
allow(FeatureGate).to receive(:enabled?).with('address_migration').and_return(false)
7064
allow(FeatureGate).to receive(:enabled?).with('people.people_managers.self_service_managed_creation').and_return(false)
7165
end
7266

@@ -79,8 +73,6 @@
7973

8074
context 'with self_service_managed_creation feature toggle enabled' do
8175
before do
82-
allow(FeatureGate).to receive(:enabled?).with('structured_addresses').and_return(true)
83-
allow(FeatureGate).to receive(:enabled?).with('address_migration').and_return(false)
8476
allow(FeatureGate).to receive(:enabled?).with('people.people_managers.self_service_managed_creation').and_return(true)
8577
end
8678

spec/jobs/export/event_participations_export_job_spec.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
lines = file.read.lines
4141
expect(lines.size).to eq(4)
4242
expect(lines[0]).to match(Regexp.new("^#{Export::Csv::UTF8_BOM}Vorname;Nachname"))
43-
expect(lines[0].split(';').count).to match(16)
43+
expect(lines[0].split(';').count).to match(19)
4444
expect(file.generated_file).to be_attached
4545
end
4646
end
@@ -66,7 +66,6 @@
6666
let(:params) { { filter: 'all', nds_camp: true } }
6767

6868
it 'and saves it' do
69-
expect(FeatureGate.enabled?('structured_addresses')).to be_truthy
7069
subject.perform
7170

7271
lines = file.read.lines

0 commit comments

Comments
 (0)