parent
47d50b0e39
commit
11ff92c9d7
@ -1,10 +1,2 @@ |
||||
.counter.counter-reblogs |
||||
%i.fa.fa-retweet |
||||
%span.num= status.reblogs.count |
||||
|
||||
.counter.counter-favourites |
||||
%i.fa.fa-star |
||||
%span.num= status.favourites.count |
||||
|
||||
- if status.reply? |
||||
= link_to "In response to #{status.thread.account.acct}", status_url(status.thread), class: 'conversation-link' |
||||
|
@ -1,5 +1,30 @@ |
||||
require 'rails_helper' |
||||
|
||||
RSpec.describe ReblogService do |
||||
pending |
||||
let(:alice) { Fabricate(:account, username: 'alice') } |
||||
let(:bob) { Fabricate(:account, username: 'bob', domain: 'example.com', salmon_url: 'http://salmon.example.com') } |
||||
let(:status) { Fabricate(:status, account: bob, uri: 'tag:example.com;something:something') } |
||||
|
||||
subject { ReblogService.new } |
||||
|
||||
before do |
||||
stub_const('HUB_URL', 'http://hub.example.com') |
||||
|
||||
stub_request(:post, 'http://hub.example.com') |
||||
stub_request(:post, 'http://salmon.example.com') |
||||
|
||||
subject.(alice, status) |
||||
end |
||||
|
||||
it 'creates a reblog' do |
||||
expect(status.reblogs.count).to eq 1 |
||||
end |
||||
|
||||
it 'pings PubSubHubbub hubs' do |
||||
expect(a_request(:post, 'http://hub.example.com')).to have_been_made |
||||
end |
||||
|
||||
it 'sends a Salmon slap for a remote reblog' do |
||||
expect(a_request(:post, 'http://salmon.example.com')).to have_been_made |
||||
end |
||||
end |
||||
|
Loading…
Reference in new issue