0
0
Fork 0

Fix subscriptions:clear task, refactor feeds, refactor streamable activites

and atom feed generation to some extent, as well as the way mentions are
stored
This commit is contained in:
Eugen Rochko 2016-03-25 02:13:30 +01:00
parent 9594f0e858
commit a08e724476
24 changed files with 219 additions and 234 deletions

View file

@ -96,18 +96,6 @@ RSpec.describe Account, type: :model do
end
end
describe '#title' do
it 'is the same as the username' do
expect(subject.title).to eql subject.username
end
end
describe '#content' do
it 'is the same as the note' do
expect(subject.content).to eql subject.note
end
end
describe '#ping!' do
pending
end

View file

@ -42,12 +42,6 @@ RSpec.describe Favourite, type: :model do
end
end
describe '#mentions' do
it 'is always empty' do
expect(subject.mentions).to be_empty
end
end
describe '#thread' do
it 'equals the target' do
expect(subject.thread).to eq subject.target

View file

@ -35,10 +35,4 @@ RSpec.describe Follow, type: :model do
expect(subject.target).to eq bob
end
end
describe '#mentions' do
it 'is empty' do
expect(subject.mentions).to be_empty
end
end
end

View file

@ -40,31 +40,6 @@ RSpec.describe Status, type: :model do
end
end
describe '#mentions' do
before do
bob # make sure the account exists
end
it 'is empty if the status is self-contained and does not mention anyone' do
expect(subject.mentions).to be_empty
end
it 'returns mentioned accounts' do
subject.mentioned_accounts.create!(account: bob)
expect(subject.mentions).to include bob
end
it 'returns account of the replied-to status' do
subject.thread = other
expect(subject.mentions).to include bob
end
it 'returns the account of the shared status' do
subject.reblog = other
expect(subject.mentions).to include bob
end
end
describe '#verb' do
it 'is always post' do
expect(subject.verb).to be :post