The code powering m.abunchtell.com https://m.abunchtell.com
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

24 righe
676 B

  1. require 'rails_helper'
  2. RSpec.describe ReblogService do
  3. let(:alice) { Fabricate(:account, username: 'alice') }
  4. let(:bob) { Fabricate(:account, username: 'bob', domain: 'example.com', salmon_url: 'http://salmon.example.com') }
  5. let(:status) { Fabricate(:status, account: bob, uri: 'tag:example.com;something:something') }
  6. subject { ReblogService.new }
  7. before do
  8. stub_request(:post, 'http://salmon.example.com')
  9. subject.(alice, status)
  10. end
  11. it 'creates a reblog' do
  12. expect(status.reblogs.count).to eq 1
  13. end
  14. it 'sends a Salmon slap for a remote reblog' do
  15. expect(a_request(:post, 'http://salmon.example.com')).to have_been_made
  16. end
  17. end