Skip to content

Commit 891fc9e

Browse files
1 parent 11ddf80 commit 891fc9e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

app/helpers/flipper_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ def access_all_districts_overview?(all_districts_params)
1616
end
1717

1818
def can_view_all_districts_nav?
19-
Flipper.enabled?("all_district_overview") && accessible_organization_facilities
19+
Flipper.enabled?(:all_district_overview, current_admin) && accessible_organization_facilities
2020
end
2121
end

spec/views/shared/_my_facilities_filters.erb_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
context "when all_district_overview Flipper flag is enabled" do
4141
before do
4242
allow(view).to receive(:access_all_districts_overview?).and_return(true)
43-
allow(Flipper).to receive(:enabled?).with("all_district_overview").and_return(true)
43+
allow(Flipper).to receive(:enabled?).with(:all_district_overview, @current_admin).and_return(true)
4444
render
4545
end
4646

@@ -70,7 +70,8 @@
7070
context "when all_district_overview Flipper flag is disabled" do
7171
before do
7272
allow(view).to receive(:access_all_districts_overview?).and_return(false)
73-
allow(Flipper).to receive(:enabled?).with("all_district_overview").and_return(false)
73+
allow(Flipper).to receive(:enabled?).with(:all_district_overview, @current_admin).and_return(false)
74+
7475
assign(:selected_facility_group, district1)
7576
assign(:zones, [zone1])
7677
assign(:facility_sizes, [size_small])

0 commit comments

Comments
 (0)