mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 12:55:56 +01:00
Remove unused Poll.unattached
scope (#33350)
This commit is contained in:
parent
d014024dc5
commit
aee64a465c
2 changed files with 0 additions and 9 deletions
|
@ -40,7 +40,6 @@ class Poll < ApplicationRecord
|
||||||
validates_with PollValidator, on: :create, if: :local?
|
validates_with PollValidator, on: :create, if: :local?
|
||||||
|
|
||||||
scope :attached, -> { where.not(status_id: nil) }
|
scope :attached, -> { where.not(status_id: nil) }
|
||||||
scope :unattached, -> { where(status_id: nil) }
|
|
||||||
|
|
||||||
before_validation :prepare_options, if: :local?
|
before_validation :prepare_options, if: :local?
|
||||||
before_validation :prepare_votes_count
|
before_validation :prepare_votes_count
|
||||||
|
|
|
@ -20,14 +20,6 @@ RSpec.describe Poll do
|
||||||
expect(results).to eq([attached_poll])
|
expect(results).to eq([attached_poll])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '.unattached' do
|
|
||||||
it 'finds the correct records' do
|
|
||||||
results = described_class.unattached
|
|
||||||
|
|
||||||
expect(results).to eq([not_attached_poll])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#reset_votes!' do
|
describe '#reset_votes!' do
|
||||||
|
|
Loading…
Reference in a new issue