about summary refs log tree commit diff
path: root/spec/controllers/api
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-09-03 00:42:47 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-09-02 17:42:47 +0200
commit6a4e2db661f47a318bbf93a07ba9f16f7bac3ee0 (patch)
treef806d4d6f236059d624f691254b7bdffb5541497 /spec/controllers/api
parentbfa7f9ebf22581a387606716fe3f86e85e1c9db5 (diff)
Raise an error for remote url in StatusFinder (#4776)
* Raise an error for remote url in StatusFinder

Previous implementation had allowed remote url with status id which also exists on local.

Then that bug leads /api/web/embed to return wrong embed url.

* Fix oembed_controller_spec
Diffstat (limited to 'spec/controllers/api')
-rw-r--r--spec/controllers/api/oembed_controller_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/controllers/api/oembed_controller_spec.rb b/spec/controllers/api/oembed_controller_spec.rb
index 43631a7e5..7af4a6a5b 100644
--- a/spec/controllers/api/oembed_controller_spec.rb
+++ b/spec/controllers/api/oembed_controller_spec.rb
@@ -8,6 +8,7 @@ RSpec.describe Api::OEmbedController, type: :controller do
 
   describe 'GET #show' do
     before do
+      request.host = Rails.configuration.x.local_domain
       get :show, params: { url: account_stream_entry_url(alice, status.stream_entry) }, format: :json
     end