about summary refs log tree commit diff
path: root/spec/services/follow_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/follow_service_spec.rb')
-rw-r--r--spec/services/follow_service_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/services/follow_service_spec.rb b/spec/services/follow_service_spec.rb
index 2ce0fa464..bda5daee1 100644
--- a/spec/services/follow_service_spec.rb
+++ b/spec/services/follow_service_spec.rb
@@ -53,10 +53,11 @@ RSpec.describe FollowService do
     end
 
     describe 'unlocked account' do
-      let(:bob) { Fabricate(:user, email: 'bob@example.com', account: Fabricate(:account, username: 'bob', domain: 'example.com', salmon_url: 'http://salmon.example.com')).account }
+      let(:bob) { Fabricate(:user, email: 'bob@example.com', account: Fabricate(:account, username: 'bob', domain: 'example.com', salmon_url: 'http://salmon.example.com', hub_url: 'http://hub.example.com')).account }
 
       before do
         stub_request(:post, "http://salmon.example.com/").to_return(:status => 200, :body => "", :headers => {})
+        stub_request(:post, "http://hub.example.com/").to_return(status: 202)
         subject.call(sender, bob.acct)
       end
 
@@ -70,6 +71,10 @@ RSpec.describe FollowService do
           xml.match(TagManager::VERBS[:follow])
         }).to have_been_made.once
       end
+
+      it 'subscribes to PuSH' do
+        expect(a_request(:post, "http://hub.example.com/")).to have_been_made.once
+      end
     end
   end
 end