about summary refs log tree commit diff
path: root/spec/models
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-03-15 11:26:59 +0100
committerClaire <claire.github-309c@sitedethib.com>2021-03-15 11:26:59 +0100
commiteac4a3e9c82b0ff8ade2e8b86282387df6039868 (patch)
treed16cecb0e7c74dc8498074ce5e0670a4b3c67b2f /spec/models
parent995ad2af30d4838d07d68f0e89f1868307d1e478 (diff)
parente89e976e924f558d13893726b3edda7b428988fd (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/account_spec.rb27
1 files changed, 0 insertions, 27 deletions
diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb
index 1d000ed4d..03d6f5fb0 100644
--- a/spec/models/account_spec.rb
+++ b/spec/models/account_spec.rb
@@ -134,18 +134,6 @@ RSpec.describe Account, type: :model do
     end
   end
 
-  describe '#subscribed?' do
-    it 'returns false when no subscription expiration information is present' do
-      account = Fabricate(:account, subscription_expires_at: nil)
-      expect(account.subscribed?).to be false
-    end
-
-    it 'returns true when subscription expiration has been set' do
-      account = Fabricate(:account, subscription_expires_at: 30.days.from_now)
-      expect(account.subscribed?).to be true
-    end
-  end
-
   describe '#possibly_stale?' do
     let(:account) { Fabricate(:account, last_webfingered_at: last_webfingered_at) }
 
@@ -707,21 +695,6 @@ RSpec.describe Account, type: :model do
       end
     end
 
-    describe 'expiring' do
-      it 'returns remote accounts with followers whose subscription expiration date is past or not given' do
-        local = Fabricate(:account, domain: nil)
-        matches = [
-          { domain: 'remote', subscription_expires_at: '2000-01-01T00:00:00Z' },
-        ].map(&method(:Fabricate).curry(2).call(:account))
-        matches.each(&local.method(:follow!))
-        Fabricate(:account, domain: 'remote', subscription_expires_at: nil)
-        local.follow!(Fabricate(:account, domain: 'remote', subscription_expires_at: '2000-01-03T00:00:00Z'))
-        local.follow!(Fabricate(:account, domain: nil, subscription_expires_at: nil))
-
-        expect(Account.expiring('2000-01-02T00:00:00Z').recent).to eq matches.reverse
-      end
-    end
-
     describe 'remote' do
       it 'returns an array of accounts who have a domain' do
         account_1 = Fabricate(:account, domain: nil)