about summary refs log tree commit diff
path: root/spec/workers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-01-28 09:38:44 +0100
committerGitHub <noreply@github.com>2022-01-28 09:38:44 +0100
commit2ba6267f1603cee682bfe3885b797ad5df7e958f (patch)
tree60586262894c6aadf5722a53ce560c9b05c3e974 /spec/workers
parent58930199379305e718d57b48488cc752b452e72a (diff)
parent94a39f6b68e236993fe5b89a697b17c8535f6ea0 (diff)
Merge pull request #1668 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/move_worker_spec.rb14
-rw-r--r--spec/workers/unfollow_follow_worker_spec.rb2
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 }