File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff 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
2121end
Original file line number Diff line number Diff line change 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
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 ] )
You can’t perform that action at this time.
0 commit comments