diff --git a/spec/components/circuit_card_component_spec.rb b/spec/components/circuit_card_component_spec.rb index 9112a14754..2ff45c8646 100644 --- a/spec/components/circuit_card_component_spec.rb +++ b/spec/components/circuit_card_component_spec.rb @@ -1,9 +1,15 @@ +# frozen_string_literal: true require "rails_helper" RSpec.describe CircuitCardComponent, type: :component do + let(:user) { FactoryBot.create(:user) } let(:circuit) { create(:project) } + before do + allow_any_instance_of(ApplicationController).to receive(:current_user).and_return(user) + end + it "renders the circuit card with correct content" do render_inline(described_class.new(circuit: circuit))