diff options
Diffstat (limited to 'spec/support/shared_examples/models/mentionable_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/models/mentionable_shared_examples.rb | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/spec/support/shared_examples/models/mentionable_shared_examples.rb b/spec/support/shared_examples/models/mentionable_shared_examples.rb index 07c5f730e95..e23658d1774 100644 --- a/spec/support/shared_examples/models/mentionable_shared_examples.rb +++ b/spec/support/shared_examples/models/mentionable_shared_examples.rb @@ -207,7 +207,7 @@ RSpec.shared_examples 'an editable mentionable' do end RSpec.shared_examples 'mentions in description' do |mentionable_type| - shared_examples 'when storing user mentions' do + context 'when storing user mentions' do before do mentionable.store_mentions! end @@ -238,26 +238,10 @@ RSpec.shared_examples 'mentions in description' do |mentionable_type| end end end - - context 'when store_mentions_without_subtransaction is enabled' do - before do - stub_feature_flags(store_mentions_without_subtransaction: true) - end - - it_behaves_like 'when storing user mentions' - end - - context 'when store_mentions_without_subtransaction is disabled' do - before do - stub_feature_flags(store_mentions_without_subtransaction: false) - end - - it_behaves_like 'when storing user mentions' - end end RSpec.shared_examples 'mentions in notes' do |mentionable_type| - shared_examples 'when mentionable notes contain mentions' do + context 'when mentionable notes contain mentions' do let(:user) { create(:user) } let(:user2) { create(:user) } let(:group) { create(:group) } @@ -277,22 +261,6 @@ RSpec.shared_examples 'mentions in notes' do |mentionable_type| expect(mentionable.referenced_groups(user)).to eq [group] end end - - context 'when store_mentions_without_subtransaction is enabled' do - before do - stub_feature_flags(store_mentions_without_subtransaction: true) - end - - it_behaves_like 'when mentionable notes contain mentions' - end - - context 'when store_mentions_without_subtransaction is disabled' do - before do - stub_feature_flags(store_mentions_without_subtransaction: false) - end - - it_behaves_like 'when mentionable notes contain mentions' - end end RSpec.shared_examples 'load mentions from DB' do |mentionable_type| |