about summary refs log tree commit diff
path: root/spec/models
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-09-30 12:25:13 -0500
committerFire Demon <firedemon@creature.cafe>2020-09-30 12:25:13 -0500
commit22e7a7947900cc974715b0c9d1d6b1a44d2ed1eb (patch)
tree918ab95c4f465c9c1fbfcd6706483e3310a38ce5 /spec/models
parent63046c8cb9df8e797d53566f2050313d757b089b (diff)
parentb5edf30160eab3776e44b34325a4ea00d9f71dc5 (diff)
Merge remote-tracking branch 'upstream/master' into merge-glitch
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/account_deletion_request_spec.rb4
-rw-r--r--spec/models/concerns/account_interactions_spec.rb4
-rw-r--r--spec/models/follow_request_spec.rb2
-rw-r--r--spec/models/invite_spec.rb2
-rw-r--r--spec/models/webauthn_credentials_spec.rb4
5 files changed, 10 insertions, 6 deletions
diff --git a/spec/models/account_deletion_request_spec.rb b/spec/models/account_deletion_request_spec.rb
new file mode 100644
index 000000000..afaecbe22
--- /dev/null
+++ b/spec/models/account_deletion_request_spec.rb
@@ -0,0 +1,4 @@
+require 'rails_helper'
+
+RSpec.describe AccountDeletionRequest, type: :model do
+end
diff --git a/spec/models/concerns/account_interactions_spec.rb b/spec/models/concerns/account_interactions_spec.rb
index 36e346f14..48b44e58d 100644
--- a/spec/models/concerns/account_interactions_spec.rb
+++ b/spec/models/concerns/account_interactions_spec.rb
@@ -14,14 +14,14 @@ describe AccountInteractions do
     context 'account with Follow' do
       it 'returns { target_account_id => { reblogs: true } }' do
         Fabricate(:follow, account: account, target_account: target_account)
-        is_expected.to eq(target_account_id => { reblogs: true })
+        is_expected.to eq(target_account_id => { reblogs: true, notify: false })
       end
     end
 
     context 'account with Follow but with reblogs disabled' do
       it 'returns { target_account_id => { reblogs: false } }' do
         Fabricate(:follow, account: account, target_account: target_account, show_reblogs: false)
-        is_expected.to eq(target_account_id => { reblogs: false })
+        is_expected.to eq(target_account_id => { reblogs: false, notify: false })
       end
     end
 
diff --git a/spec/models/follow_request_spec.rb b/spec/models/follow_request_spec.rb
index 4b824c0db..7c8e121d9 100644
--- a/spec/models/follow_request_spec.rb
+++ b/spec/models/follow_request_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe FollowRequest, type: :model do
     let(:target_account) { Fabricate(:account) }
 
     it 'calls Account#follow!, MergeWorker.perform_async, and #destroy!' do
-      expect(account).to        receive(:follow!).with(target_account, reblogs: true, uri: follow_request.uri)
+      expect(account).to        receive(:follow!).with(target_account, reblogs: true, notify: false, uri: follow_request.uri)
       expect(MergeWorker).to    receive(:perform_async).with(target_account.id, account.id)
       expect(follow_request).to receive(:destroy!)
       follow_request.authorize!
diff --git a/spec/models/invite_spec.rb b/spec/models/invite_spec.rb
index 30abfb86b..b0596c561 100644
--- a/spec/models/invite_spec.rb
+++ b/spec/models/invite_spec.rb
@@ -29,7 +29,7 @@ RSpec.describe Invite, type: :model do
 
     it 'returns false when invite creator has been disabled' do
       invite = Fabricate(:invite, max_uses: nil, expires_at: nil)
-      SuspendAccountService.new.call(invite.user.account)
+      invite.user.account.suspend!
       expect(invite.valid_for_use?).to be false
     end
   end
diff --git a/spec/models/webauthn_credentials_spec.rb b/spec/models/webauthn_credentials_spec.rb
index 9289c371e..a63ae6cd2 100644
--- a/spec/models/webauthn_credentials_spec.rb
+++ b/spec/models/webauthn_credentials_spec.rb
@@ -69,8 +69,8 @@ RSpec.describe WebauthnCredential, type: :model do
       expect(webauthn_credential).to model_have_error_on_field(:sign_count)
     end
 
-    it 'is invalid if sign_count is greater 2**32 - 1' do
-      webauthn_credential = Fabricate.build(:webauthn_credential, sign_count: 2**32)
+    it 'is invalid if sign_count is greater 2**63 - 1' do
+      webauthn_credential = Fabricate.build(:webauthn_credential, sign_count: 2**63)
 
       webauthn_credential.valid?