about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-04-27 18:16:44 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-04-28 00:16:44 +0200
commit9736753985b28e0702baf8e41393d66fa3c71a2c (patch)
tree30afa7e1525687f7a52d99fcccd707cd53af34cc
parentea783d3632112d3731cea243835638ea79b1d60f (diff)
Fix remote follow (#2547)
* Add coverage for remote_follow#new

* Fix reference to authorize_follows/card partial
-rw-r--r--app/views/remote_follow/new.html.haml2
-rw-r--r--spec/controllers/remote_follow_controller_spec.rb16
2 files changed, 17 insertions, 1 deletions
diff --git a/app/views/remote_follow/new.html.haml b/app/views/remote_follow/new.html.haml
index e88ccccce..fa48e5e62 100644
--- a/app/views/remote_follow/new.html.haml
+++ b/app/views/remote_follow/new.html.haml
@@ -2,7 +2,7 @@
   .follow-prompt
     %h2= t('remote_follow.prompt')
 
-    = render partial: 'authorize_follow/card', locals: { account: @account }
+    = render partial: 'authorize_follows/card', locals: { account: @account }
 
   = simple_form_for @remote_follow, as: :remote_follow, url: account_remote_follow_path(@account) do |f|
     = render 'shared/error_messages', object: @remote_follow
diff --git a/spec/controllers/remote_follow_controller_spec.rb b/spec/controllers/remote_follow_controller_spec.rb
new file mode 100644
index 000000000..1c9e6a4b6
--- /dev/null
+++ b/spec/controllers/remote_follow_controller_spec.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+
+describe RemoteFollowController do
+  render_views
+
+  describe '#new' do
+    it 'returns a success' do
+      account = Fabricate(:account)
+      get :new, params: { account_username: account.to_param }
+
+      expect(response).to have_http_status(:success)
+    end
+  end
+end