Commit bdd752c9 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Remove redundant contexts in specs

parent c996970b
...@@ -197,7 +197,6 @@ RSpec.describe EE::TrialHelper do ...@@ -197,7 +197,6 @@ RSpec.describe EE::TrialHelper do
it { is_expected.to be_falsey } it { is_expected.to be_falsey }
end end
context 'when feature flag is enabled' do
where(:can_extend_trial, :can_reactivate_trial, :result) do where(:can_extend_trial, :can_reactivate_trial, :result) do
false | false | false false | false | false
true | false | true true | false | true
...@@ -207,8 +206,6 @@ RSpec.describe EE::TrialHelper do ...@@ -207,8 +206,6 @@ RSpec.describe EE::TrialHelper do
with_them do with_them do
before do before do
stub_feature_flags(allow_extend_reactivate_trial: true)
allow(namespace).to receive(:can_extend_trial?).and_return(can_extend_trial) allow(namespace).to receive(:can_extend_trial?).and_return(can_extend_trial)
allow(namespace).to receive(:can_reactivate_trial?).and_return(can_reactivate_trial) allow(namespace).to receive(:can_reactivate_trial?).and_return(can_reactivate_trial)
end end
...@@ -216,7 +213,6 @@ RSpec.describe EE::TrialHelper do ...@@ -216,7 +213,6 @@ RSpec.describe EE::TrialHelper do
it { is_expected.to eq(result) } it { is_expected.to eq(result) }
end end
end end
end
describe '#extend_reactivate_trial_button_data' do describe '#extend_reactivate_trial_button_data' do
let(:namespace) { build(:namespace, id: 1) } let(:namespace) { build(:namespace, id: 1) }
...@@ -253,7 +249,6 @@ RSpec.describe EE::TrialHelper do ...@@ -253,7 +249,6 @@ RSpec.describe EE::TrialHelper do
end end
end end
context 'when feature flag is enabled' do
context 'when trial can be extended' do context 'when trial can be extended' do
before do before do
allow(namespace).to receive(:can_extend_trial?).and_return(true) allow(namespace).to receive(:can_extend_trial?).and_return(true)
...@@ -270,5 +265,4 @@ RSpec.describe EE::TrialHelper do ...@@ -270,5 +265,4 @@ RSpec.describe EE::TrialHelper do
it { is_expected.to eq({ namespace_id: 1, plan_name: 'Ultimate', action: 'reactivate' }) } it { is_expected.to eq({ namespace_id: 1, plan_name: 'Ultimate', action: 'reactivate' }) }
end end
end end
end
end end
...@@ -1261,7 +1261,6 @@ RSpec.describe Namespace do ...@@ -1261,7 +1261,6 @@ RSpec.describe Namespace do
it { is_expected.to be_falsey } it { is_expected.to be_falsey }
end end
context 'when feature flag is enabled' do
where(:trial_active, :trial_extended_or_reactivated, :can_extend_trial) do where(:trial_active, :trial_extended_or_reactivated, :can_extend_trial) do
false | false | false false | false | false
false | true | false false | true | false
...@@ -1278,7 +1277,6 @@ RSpec.describe Namespace do ...@@ -1278,7 +1277,6 @@ RSpec.describe Namespace do
it { is_expected.to be can_extend_trial } it { is_expected.to be can_extend_trial }
end end
end end
end
describe '#can_reactivate_trial?' do describe '#can_reactivate_trial?' do
subject { namespace.can_reactivate_trial? } subject { namespace.can_reactivate_trial? }
...@@ -1296,7 +1294,6 @@ RSpec.describe Namespace do ...@@ -1296,7 +1294,6 @@ RSpec.describe Namespace do
it { is_expected.to be_falsey } it { is_expected.to be_falsey }
end end
context 'when feature flag is enabled' do
where(:trial_active, :never_had_trial, :trial_extended_or_reactivated, :free_plan, :can_reactivate_trial) do where(:trial_active, :never_had_trial, :trial_extended_or_reactivated, :free_plan, :can_reactivate_trial) do
false | false | false | false | false false | false | false | false | false
false | false | false | true | true false | false | false | true | true
...@@ -1327,7 +1324,6 @@ RSpec.describe Namespace do ...@@ -1327,7 +1324,6 @@ RSpec.describe Namespace do
it { is_expected.to be can_reactivate_trial } it { is_expected.to be can_reactivate_trial }
end end
end end
end
describe '#file_template_project_id' do describe '#file_template_project_id' do
it 'is cleared before validation' do it 'is cleared before validation' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment