diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-15 21:20:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-15 21:20:55 +0200 |
commit | af706583bde6efba4c03922d518e0af1d652d8c5 (patch) | |
tree | 08bf7566664861af5976d641730ee3589a7d40c9 /spec/services | |
parent | 85c9496340668ad2ebd04eea57d669f82b7dbaf1 (diff) |
Fix change of status callbacks not setting in_reply_to_account_id and (#3072)
possibly others when expected. Add some tests for it
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/process_feed_service_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/services/process_feed_service_spec.rb b/spec/services/process_feed_service_spec.rb index f16dda4d4..9ac22cbba 100644 --- a/spec/services/process_feed_service_spec.rb +++ b/spec/services/process_feed_service_spec.rb @@ -31,6 +31,16 @@ RSpec.describe ProcessFeedService do expect(Status.find_by(uri: 'tag:kickass.zone,2016-10-10:objectId=2:objectType=Status')).to_not be_nil end + it 'marks replies as replies' do + status = Status.find_by(uri: 'tag:kickass.zone,2016-10-10:objectId=2:objectType=Status') + expect(status.reply?).to be true + end + + it 'sets account being replied to when possible' do + status = Status.find_by(uri: 'tag:kickass.zone,2016-10-10:objectId=2:objectType=Status') + expect(status.in_reply_to_account_id).to eq status.account_id + end + it 'ignores delete statuses unless they existed before' do expect(Status.find_by(uri: 'tag:kickass.zone,2016-10-10:objectId=3:objectType=Status')).to be_nil expect(Status.find_by(uri: 'tag:kickass.zone,2016-10-10:objectId=12:objectType=Status')).to be_nil |