Skip to content

Commit

Permalink
use existing user in FollowButtonComponent test
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Sep 3, 2024
1 parent af57166 commit 461912c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions spec/components/follow_button_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
require "rails_helper"

RSpec.describe FollowButtonComponent, type: :component do
let(:user) { create :user }
let(:follower) { create(:user) }
let(:target) { create(:creator) }

before do
sign_in(user)
sign_in(follower)
allow(SiteSettings).to receive(:multiuser_enabled?).and_return(true)
end

let(:follower) { create(:user) }
let(:target) { create(:creator) }

context "when the follower is not following the target" do
let(:button) {
allow(follower).to receive(:following?).with(target).and_return false
Expand Down

0 comments on commit 461912c

Please sign in to comment.