(rubocop) Fix Layout/MultilineMethodCallIndentation

This commit is contained in:
Tim Sharpe 2019-02-03 12:39:47 +11:00
parent 6f40397136
commit b2ac1ddf2f
3 changed files with 15 additions and 15 deletions

View file

@ -16,8 +16,8 @@ describe Pooler do
it 'returns a token from vmpooler' do it 'returns a token from vmpooler' do
stub_request(:post, 'https://first.last:password@vmpooler.example.com/token') stub_request(:post, 'https://first.last:password@vmpooler.example.com/token')
.with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2' }) .with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2' })
.to_return(:status => 200, :body => @get_token_response, :headers => {}) .to_return(:status => 200, :body => @get_token_response, :headers => {})
token = Auth.get_token(false, @vmpooler_url, 'first.last', 'password') token = Auth.get_token(false, @vmpooler_url, 'first.last', 'password')
expect(token).to eq @token expect(token).to eq @token
@ -25,8 +25,8 @@ describe Pooler do
it 'raises a token error if something goes wrong' do it 'raises a token error if something goes wrong' do
stub_request(:post, 'https://first.last:password@vmpooler.example.com/token') stub_request(:post, 'https://first.last:password@vmpooler.example.com/token')
.with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2' }) .with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2' })
.to_return(:status => 500, :body => '{"ok":false}', :headers => {}) .to_return(:status => 500, :body => '{"ok":false}', :headers => {})
expect { Auth.get_token(false, @vmpooler_url, 'first.last', 'password') }.to raise_error(TokenError) expect { Auth.get_token(false, @vmpooler_url, 'first.last', 'password') }.to raise_error(TokenError)
end end

View file

@ -175,12 +175,12 @@ BODY
it 'raises an error if the user tries to modify an unsupported attribute' do it 'raises an error if the user tries to modify an unsupported attribute' do
stub_request(:put, 'https://nspooler.example.com/host/myfakehost') stub_request(:put, 'https://nspooler.example.com/host/myfakehost')
.with(:body => { '{}' => true }, .with(:body => { '{}' => true },
:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type' => 'application/x-www-form-urlencoded', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'token-value' }) :headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type' => 'application/x-www-form-urlencoded', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'token-value' })
.to_return(:status => 200, :body => '', :headers => {}) .to_return(:status => 200, :body => '', :headers => {})
details = { :lifetime => 12 } details = { :lifetime => 12 }
expect { NonstandardPooler.modify(false, @nspooler_url, 'myfakehost', 'token-value', details) } expect { NonstandardPooler.modify(false, @nspooler_url, 'myfakehost', 'token-value', details) }
.to raise_error(ModifyError) .to raise_error(ModifyError)
end end
it 'modifies the reason of a vm' do it 'modifies the reason of a vm' do

View file

@ -174,8 +174,8 @@ describe Utils do
service = Service.new(MockOptions.new, 'url' => url) service = Service.new(MockOptions.new, 'url' => url)
allow(service).to receive(:query) allow(service).to receive(:query)
.with(nil, hostname) .with(nil, hostname)
.and_return(response_body) .and_return(response_body)
Utils.pretty_print_hosts(nil, service, hostname) Utils.pretty_print_hosts(nil, service, hostname)
end end
@ -200,8 +200,8 @@ describe Utils do
service = Service.new(MockOptions.new, 'url' => url) service = Service.new(MockOptions.new, 'url' => url)
allow(service).to receive(:query) allow(service).to receive(:query)
.with(nil, hostname) .with(nil, hostname)
.and_return(response_body) .and_return(response_body)
Utils.pretty_print_hosts(nil, service, hostname) Utils.pretty_print_hosts(nil, service, hostname)
end end
@ -221,8 +221,8 @@ describe Utils do
service = Service.new(MockOptions.new, 'url' => url, 'type' => 'ns') service = Service.new(MockOptions.new, 'url' => url, 'type' => 'ns')
allow(service).to receive(:query) allow(service).to receive(:query)
.with(nil, hostname) .with(nil, hostname)
.and_return(response_body) .and_return(response_body)
Utils.pretty_print_hosts(nil, service, hostname) Utils.pretty_print_hosts(nil, service, hostname)
end end
@ -242,8 +242,8 @@ describe Utils do
service = Service.new(MockOptions.new, 'url' => url, 'type' => 'ns') service = Service.new(MockOptions.new, 'url' => url, 'type' => 'ns')
allow(service).to receive(:query) allow(service).to receive(:query)
.with(nil, hostname) .with(nil, hostname)
.and_return(response_body) .and_return(response_body)
Utils.pretty_print_hosts(nil, service, hostname) Utils.pretty_print_hosts(nil, service, hostname)
end end