Fix RSpec/InstanceVariable
cop (#27766)
This commit is contained in:
parent
4329616c53
commit
69d00e2721
11 changed files with 97 additions and 124 deletions
|
@ -26,7 +26,6 @@ describe Api::V1::StreamingController do
|
|||
context 'with streaming api on different host' do
|
||||
before do
|
||||
Rails.configuration.x.streaming_api_base_url = "wss://streaming-#{Rails.configuration.x.web_domain}"
|
||||
@streaming_host = URI.parse(Rails.configuration.x.streaming_api_base_url).host
|
||||
end
|
||||
|
||||
describe 'GET #index' do
|
||||
|
@ -38,7 +37,13 @@ describe Api::V1::StreamingController do
|
|||
[:scheme, :path, :query, :fragment].each do |part|
|
||||
expect(redirect_to_uri.send(part)).to eq(request_uri.send(part)), "redirect target #{part}"
|
||||
end
|
||||
expect(redirect_to_uri.host).to eq(@streaming_host), 'redirect target host'
|
||||
expect(redirect_to_uri.host).to eq(streaming_host), 'redirect target host'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def streaming_host
|
||||
URI.parse(Rails.configuration.x.streaming_api_base_url).host
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue