diff options
Diffstat (limited to 'spec/helpers/avatars_helper_spec.rb')
-rw-r--r-- | spec/helpers/avatars_helper_spec.rb | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/spec/helpers/avatars_helper_spec.rb b/spec/helpers/avatars_helper_spec.rb index 7fcd5ae880a..120dbe7cb49 100644 --- a/spec/helpers/avatars_helper_spec.rb +++ b/spec/helpers/avatars_helper_spec.rb @@ -121,27 +121,13 @@ RSpec.describe AvatarsHelper do end end - context "when :avatar_cache_for_email flag is enabled" do - before do - stub_feature_flags(avatar_cache_for_email: true) - end - - it_behaves_like "returns avatar for email" + it_behaves_like "returns avatar for email" - it "caches the request" do - expect(User).to receive(:find_by_any_email).once.and_call_original - - expect(helper.avatar_icon_for_email(user.email).to_s).to eq(user.avatar.url) - expect(helper.avatar_icon_for_email(user.email).to_s).to eq(user.avatar.url) - end - end - - context "when :avatar_cache_for_email flag is disabled" do - before do - stub_feature_flags(avatar_cache_for_email: false) - end + it "caches the request" do + expect(User).to receive(:find_by_any_email).once.and_call_original - it_behaves_like "returns avatar for email" + expect(helper.avatar_icon_for_email(user.email).to_s).to eq(user.avatar.url) + expect(helper.avatar_icon_for_email(user.email).to_s).to eq(user.avatar.url) end end |