From 98f8b206cb8d981058efa28456d23516b595e8d2 Mon Sep 17 00:00:00 2001 From: Sam Seed Date: Tue, 22 Nov 2022 17:40:54 +0000 Subject: [PATCH] test: check scheme toggle off => no scheme status shown --- spec/helpers/schemes_helper_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/helpers/schemes_helper_spec.rb b/spec/helpers/schemes_helper_spec.rb index 52ee45dfe..6a26395d9 100644 --- a/spec/helpers/schemes_helper_spec.rb +++ b/spec/helpers/schemes_helper_spec.rb @@ -152,6 +152,14 @@ expect(display_scheme_attributes(scheme, coordinator_user)).to eq(attributes) end + context "when the scheme toggle is disabled" do + it "doesn't show the scheme status" do + allow(FeatureToggle).to receive(:scheme_toggle_enabled?).and_return(false) + attributes = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Status" } + expect(attributes).to be_nil + end + end + context "when viewing availability" do context "with no deactivations" do it "displays created_at as availability date" do