diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-01-28 08:58:32 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-01-28 08:58:32 +0100 |
commit | b2915613fb247597d3de2f80c2c007b3369ac5bb (patch) | |
tree | 745c245cb4c2d16dcada37d1fb1cf5b13f4e2493 /spec/workers | |
parent | ad6ddb9bdd3ceae3f9d5dde7b351081f0dfa2a9a (diff) | |
parent | e38fc319dc6897ca867a509b0c7a5878d34d0f00 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `Gemfile.lock`: Upstream-updated lib textually too close to glitch-soc-only dep. Updated like upstream.
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/move_worker_spec.rb | 14 | ||||
-rw-r--r-- | spec/workers/unfollow_follow_worker_spec.rb | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/spec/workers/move_worker_spec.rb b/spec/workers/move_worker_spec.rb index 82449b0c7..4db5810f1 100644 --- a/spec/workers/move_worker_spec.rb +++ b/spec/workers/move_worker_spec.rb @@ -3,9 +3,9 @@ require 'rails_helper' describe MoveWorker do - let(:local_follower) { Fabricate(:user, email: 'bob@example.com', account: Fabricate(:account, username: 'bob')).account } - let(:blocking_account) { Fabricate(:user, email: 'bar@example.com', account: Fabricate(:account, username: 'bar')).account } - let(:muting_account) { Fabricate(:user, email: 'foo@example.com', account: Fabricate(:account, username: 'foo')).account } + let(:local_follower) { Fabricate(:account) } + let(:blocking_account) { Fabricate(:account) } + let(:muting_account) { Fabricate(:account) } let(:source_account) { Fabricate(:account, protocol: :activitypub, domain: 'example.com') } let(:target_account) { Fabricate(:account, protocol: :activitypub, domain: 'example.com') } let(:local_user) { Fabricate(:user) } @@ -88,7 +88,7 @@ describe MoveWorker do end context 'target account is local' do - let(:target_account) { Fabricate(:user, email: 'alice@example.com', account: Fabricate(:account, username: 'alice')).account } + let(:target_account) { Fabricate(:account) } describe 'perform' do it 'calls UnfollowFollowWorker' do @@ -102,8 +102,8 @@ describe MoveWorker do end context 'both target and source accounts are local' do - let(:target_account) { Fabricate(:user, email: 'alice@example.com', account: Fabricate(:account, username: 'alice')).account } - let(:source_account) { Fabricate(:user, email: 'alice_@example.com', account: Fabricate(:account, username: 'alice_')).account } + let(:target_account) { Fabricate(:account) } + let(:source_account) { Fabricate(:account) } describe 'perform' do it 'calls makes local followers follow the target account' do @@ -115,7 +115,7 @@ describe MoveWorker do include_examples 'block and mute handling' it 'does not fail when a local user is already following both accounts' do - double_follower = Fabricate(:user, email: 'eve@example.com', account: Fabricate(:account, username: 'eve')).account + double_follower = Fabricate(:account) double_follower.follow!(source_account) double_follower.follow!(target_account) subject.perform(source_account.id, target_account.id) diff --git a/spec/workers/unfollow_follow_worker_spec.rb b/spec/workers/unfollow_follow_worker_spec.rb index 5052c5616..5ea4256a9 100644 --- a/spec/workers/unfollow_follow_worker_spec.rb +++ b/spec/workers/unfollow_follow_worker_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' describe UnfollowFollowWorker do - let(:local_follower) { Fabricate(:user, email: 'bob@example.com', account: Fabricate(:account, username: 'bob')).account } + let(:local_follower) { Fabricate(:account) } let(:source_account) { Fabricate(:account) } let(:target_account) { Fabricate(:account) } let(:show_reblogs) { true } |