remove redundant feat flag (#17405)

This commit is contained in:
Suzanne Aitchison 2022-04-22 16:14:16 +01:00 committed by GitHub
parent 33eb6070f4
commit ece0cbbba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
require "rails_helper"
RSpec.describe "Logo behaviour with creator_onboarding Feature Flag", type: :system do
RSpec.describe "Logo behaviour", type: :system do
let!(:user) { create(:user) }
let(:resized_logo) { "default.png" }
@ -8,34 +8,28 @@ RSpec.describe "Logo behaviour with creator_onboarding Feature Flag", type: :sys
sign_in user
end
context "when Feature flag creator_onboarding is enabled" do
context "with an image set" do
before do
allow(FeatureFlag).to receive(:enabled?).with(:creator_onboarding).and_return(true)
allow(Settings::General).to receive(:resized_logo).and_return(resized_logo)
end
context "with an image set" do
before do
allow(Settings::General).to receive(:resized_logo).and_return(resized_logo)
end
it "renders the resized_logo" do
visit root_path
within(".site-logo") do
expect(page.find(".site-logo__img")["src"]).to have_content(resized_logo)
end
it "renders the resized_logo" do
visit root_path
within(".site-logo") do
expect(page.find(".site-logo__img")["src"]).to have_content(resized_logo)
end
end
end
context "without an image set" do
before do
allow(Settings::General).to receive(:resized_logo).and_return(nil)
end
context "without an image set" do
before do
allow(Settings::General).to receive(:resized_logo).and_return(nil)
end
it "renders the the community name" do
visit root_path
within(".truncate-at-2") do
expect(page).to have_text("DEV(local)")
end
it "renders the the community name" do
visit root_path
within(".truncate-at-2") do
expect(page).to have_text("DEV(local)")
end
end
end